url_to_postid WordPress Filter Hook
The url_to_postid hook allows you to convert a URL to a post ID. This can be useful if you need to get the ID of a post from its URL.
apply_filters( 'url_to_postid', string $url ) #
Filters the URL to derive the post ID from.
Parameters
- $url
(string)The URL to derive the post ID from.
Source
File: wp-includes/rewrite.php
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |