WordPress.org

Make WordPress Core

Changeset 47182


Ignore:
Timestamp:
02/05/2020 03:12:14 AM (13 months ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify that is_page_template() accepts a template filename, not the Template Name file header.

Props mkaz.
Fixes #49362.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r47122 r47182  
    17311731 *
    17321732 * This template tag allows you to determine if you are in a page template.
    1733  * You can optionally provide a template name or array of template names
     1733 * You can optionally provide a template filename or array of template filenames
    17341734 * and then the check will be specific to that template.
    17351735 *
     
    17421742 * @since 4.7.0 Now works with any post type, not just pages.
    17431743 *
    1744  * @param string|array $template The specific template name or array of templates to match.
     1744 * @param string|array $template The specific template filename or array of templates to match.
    17451745 * @return bool True on success, false on failure.
    17461746 */
     
    17721772
    17731773/**
    1774  * Get the specific template name for a given post.
     1774 * Get the specific template filename for a given post.
    17751775 *
    17761776 * @since 3.4.0
     
    17791779 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
    17801780 * @return string|false Page template filename. Returns an empty string when the default page template
    1781  *  is in use. Returns false if the post does not exist.
     1781 *                      is in use. Returns false if the post does not exist.
    17821782 */
    17831783function get_page_template_slug( $post = null ) {
Note: See TracChangeset for help on using the changeset viewer.