WordPress.org

Make WordPress Core

Changeset 51150


Ignore:
Timestamp:
06/15/2021 10:20:54 AM (3 months ago)
Author:
SergeyBiryukov
Message:

Docs: Document the usage of $_wp_current_template_content global in a few block template functions.

Follow-up to [51003], [51149].

See #52628.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r51003 r51150  
    1212 *
    1313 * @since 5.8.0
     14 *
     15 * @global string $_wp_current_template_content
    1416 *
    1517 * @param string $template  Path to the template. See locate_template().
     
    148150 * @since 5.8.0
    149151 *
    150  * @return string block tempate markup.
     152 * @global string   $_wp_current_template_content
     153 * @global WP_Embed $wp_embed
     154 *
     155 * @return string Block template markup.
    151156 */
    152157function get_the_block_template_html() {
  • trunk/src/wp-includes/theme-templates.php

    r51149 r51150  
    7373 * @since 5.8.0
    7474 *
     75 * @global string $_wp_current_template_content
     76 *
    7577 * @return void
    7678 */
    7779function the_block_template_skip_link() {
     80    global $_wp_current_template_content;
    7881
    7982    // Early exit if not a block theme.
     
    8386
    8487    // Early exit if not a block template.
    85     global $_wp_current_template_content;
    8688    if ( ! $_wp_current_template_content ) {
    8789        return;
Note: See TracChangeset for help on using the changeset viewer.