mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Posts, Post Types: Ensure is_page_template() can only return true when viewing a singular post query.
Props natereist, dlh Fixes #39211 git-svn-id: https://develop.svn.wordpress.org/trunk@39599 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 ) )
|
||||
|
||||
Reference in New Issue
Block a user