url_to_postid
Filters the URL to derive the post ID from.
Использование
add_filter( 'url_to_postid', 'wp_kama_url_to_postid_filter' );
/**
* Function for `url_to_postid` filter-hook.
*
* @param string $url The URL to derive the post ID from.
*
* @return string
*/
function wp_kama_url_to_postid_filter( $url ){
// filter...
return $url;
}
- $url(строка)
- The URL to derive the post ID from.
Список изменений
| С версии 2.2.0 | Введена. |
Где вызывается хук
url_to_postid
wp-includes/rewrite.php 500
$url = apply_filters( 'url_to_postid', $url );