Docs: Document the usage of $_wp_current_template_content global in a few block template functions.
Follow-up to [51003], [51149]. See #52628. Built from https://develop.svn.wordpress.org/trunk@51150 git-svn-id: http://core.svn.wordpress.org/trunk@50759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -72,9 +72,12 @@ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_ID
|
||||
* @access private
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @global string $_wp_current_template_content
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function the_block_template_skip_link() {
|
||||
global $_wp_current_template_content;
|
||||
|
||||
// Early exit if not a block theme.
|
||||
if ( ! current_theme_supports( 'block-templates' ) ) {
|
||||
@@ -82,7 +85,6 @@ function the_block_template_skip_link() {
|
||||
}
|
||||
|
||||
// Early exit if not a block template.
|
||||
global $_wp_current_template_content;
|
||||
if ( ! $_wp_current_template_content ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user