Make WordPress Core


Ignore:
Timestamp:
12/14/2016 03:42:58 AM (9 years ago)
Author:
johnbillion
Message:

Posts, Post Types: Ensure is_page_template() can only return true when viewing a singular post query.

Props natereist, dlh
Fixes #39211

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r38951 r39599  
    16321632 */
    16331633function is_page_template( $template = '' ) {
     1634    if ( ! is_singular() ) {
     1635        return false;
     1636    }
     1637
    16341638    $page_template = get_page_template_slug( get_queried_object_id() );
    16351639
Note: See TracChangeset for help on using the changeset viewer.