Posts, Post Types: Ensure `is_page_template()` can only return true when viewing a singular post query.
Props natereist, dlh, johnbillion. Merges [39599] to the 4.7 branch. Fixes #39211. Built from https://develop.svn.wordpress.org/branches/4.7@39608 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b24993e4cd
commit
72d9177fc0
|
@ -1631,6 +1631,10 @@ function get_the_password_form( $post = 0 ) {
|
|||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function is_page_template( $template = '' ) {
|
||||
if ( ! is_singular() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$page_template = get_page_template_slug( get_queried_object_id() );
|
||||
|
||||
if ( empty( $template ) )
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7.1-alpha-39607';
|
||||
$wp_version = '4.7.1-alpha-39608';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue