Make WordPress Core

Ticket #1612: url_to_postid-functions.php.diff

File url_to_postid-functions.php.diff, 455 bytes (added by markjaquith, 20 years ago)

patch for functions.php (WP 1.6 SVN)

  • functions.php

     
    247247                        // Substitute the substring matches into the query.
    248248                        eval("\$query = \"$query\";");
    249249                        $query = new WP_Query($query);
    250                         if ( $query->is_post || $query->is_page )
     250                        if ( $query->is_single || $query->is_page )
    251251                                return $query->post->ID;
    252252                        else
    253253                                return 0;