From 4e1752407b124a4736f7969daf97983a45914d2c Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 15 Sep 2022 12:42:35 +0000 Subject: [PATCH] Docs: Clarify that `get_page_template()` doesn't work on block themes. When working on a block theme, `locate_block_template()` should be used instead of `get_page_template()`. This changeset updates the docblock of this function accordingly. Props audrasjb, costdev, robinwpdeveloper. Fixes #56394. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@54179 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/template.php b/src/wp-includes/template.php index 60752349c0..741299b653 100644 --- a/src/wp-includes/template.php +++ b/src/wp-includes/template.php @@ -437,6 +437,8 @@ function get_privacy_policy_template() { /** * Retrieve path of page template in current or parent template. * + * Note: For block themes, use locate_block_template function instead. + * * The hierarchy for this template looks like: * * 1. {Page Template}.php