url_to_postid

url_to_postid

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('url_to_postid') is found 1 times:

  • /wp-includes/rewrite.php line 502
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    * @since 2.2.0
     *
     * @param string $url The URL to derive the post ID from.
     */
    $url = apply_filters( 'url_to_postid', $url );
     
    $url_host = parse_url( $url, PHP_URL_HOST );
     
    if ( is_string( $url_host ) ) {
        $url_host = str_replace( 'www.', '', $url_host );
    } else {