WordPress.org

Make WordPress Core

Changeset 16877


Ignore:
Timestamp:
12/11/2010 09:25:02 AM (8 years ago)
Author:
scribu
Message:

Use is_singular in url_to_postid(). See #15771

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r16872 r16877  
    338338            // Do the query
    339339            $query = new WP_Query($query);
    340             if ( !empty($query->posts) && ($query->is_single || $query->is_page) )
     340            if ( !empty($query->posts) && $query->is_singular )
    341341                return $query->post->ID;
    342342            else
Note: See TracChangeset for help on using the changeset viewer.