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.

Built from https://develop.svn.wordpress.org/trunk@54179


git-svn-id: http://core.svn.wordpress.org/trunk@53738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb
2022-09-15 12:44:09 +00:00
parent 3b0c68d032
commit 199454f6ae
2 changed files with 3 additions and 1 deletions

View File

@@ -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