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
This commit is contained in:
Jb Audras 2022-09-15 12:42:35 +00:00
parent 7bb7969664
commit 4e1752407b

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