From e2440d55e71c476384e753cd8304df16881cbeb5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 5 Feb 2020 03:14:06 +0000 Subject: [PATCH] Docs: Clarify that `is_page_template()` accepts a template filename, not the `Template Name` file header. Props mkaz. Fixes #49362. Built from https://develop.svn.wordpress.org/trunk@47182 git-svn-id: http://core.svn.wordpress.org/trunk@46982 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index a2a737df48..c7f8177c10 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1730,7 +1730,7 @@ function get_the_password_form( $post = 0 ) { * Determines whether currently in a page template. * * This template tag allows you to determine if you are in a page template. - * You can optionally provide a template name or array of template names + * You can optionally provide a template filename or array of template filenames * and then the check will be specific to that template. * * For more information on this and similar theme functions, check out @@ -1741,7 +1741,7 @@ function get_the_password_form( $post = 0 ) { * @since 4.2.0 The `$template` parameter was changed to also accept an array of page templates. * @since 4.7.0 Now works with any post type, not just pages. * - * @param string|array $template The specific template name or array of templates to match. + * @param string|array $template The specific template filename or array of templates to match. * @return bool True on success, false on failure. */ function is_page_template( $template = '' ) { @@ -1771,14 +1771,14 @@ function is_page_template( $template = '' ) { } /** - * Get the specific template name for a given post. + * Get the specific template filename for a given post. * * @since 3.4.0 * @since 4.7.0 Now works with any post type, not just pages. * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. * @return string|false Page template filename. Returns an empty string when the default page template - * is in use. Returns false if the post does not exist. + * is in use. Returns false if the post does not exist. */ function get_page_template_slug( $post = null ) { $post = get_post( $post ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1e45c6eb3d..2642d86bc8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-47181'; +$wp_version = '5.4-alpha-47182'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.