]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-post.php
WordPress 4.7.2
[autoinstalls/wordpress.git] / wp-includes / class-wp-post.php
index 5904e588d04cf127b7ea087a31b8f3f13db823b4..edaf149a3f69618931034a397721762252a0509f 100644 (file)
@@ -211,8 +211,9 @@ final class WP_Post {
                global $wpdb;
 
                $post_id = (int) $post_id;
-               if ( ! $post_id )
+               if ( ! $post_id ) {
                        return false;
+               }
 
                $_post = wp_cache_get( $post_id, 'posts' );
 
@@ -252,7 +253,7 @@ final class WP_Post {
                        return true;
 
                if ( 'page_template' == $key )
-                       return ( 'page' == $this->post_type );
+                       return true;
 
                if ( 'post_category' == $key )
                   return true;