WordPress.org

Make WordPress Core

Ticket #39211: 39211.patch

File 39211.patch, 489 bytes (added by natereist, 3 years ago)

Added an is_singular check to the file.

  • src/wp-includes/post-template.php

     
    16311631 * @return bool True on success, false on failure.
    16321632 */
    16331633function is_page_template( $template = '' ) {
     1634        if ( ! is_singular() )
     1635                return false;
     1636               
    16341637        $page_template = get_page_template_slug( get_queried_object_id() );
    16351638
    16361639        if ( empty( $template ) )