W3cubDocs

/WordPress

apply_filters( ‘url_to_postid’, string $url )

Filters the URL to derive the post ID from.

Parameters

$urlstring
The URL to derive the post ID from.

Source

$url = apply_filters( 'url_to_postid', $url );

Changelog

Version Description
2.2.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/url_to_postid