Make WordPress Core

Changeset 51168


Ignore:
Timestamp:
06/16/2021 09:41:44 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update syntax for some multi-line comments per the documentation standards.

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

See #52628.

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

Legend:

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

    r51150 r51168  
    2424
    2525    if ( $template ) {
    26         // locate_template() has found a PHP template at the path specified by $template.
    27         // That means that we have a fallback candidate if we cannot find a block template
    28         // with higher specificity.
    29         // Thus, before looking for matching block themes, we shorten our list of candidate
    30         // templates accordingly.
     26        /*
     27         * locate_template() has found a PHP template at the path specified by $template.
     28         * That means that we have a fallback candidate if we cannot find a block template
     29         * with higher specificity.
     30         *
     31         * Thus, before looking for matching block themes, we shorten our list of candidate
     32         * templates accordingly.
     33         */
    3134
    3235        // Locate the index of $template (without the theme directory path) in $templates.
     
    219222function _block_template_render_without_post_block_context( $context ) {
    220223    /*
    221      * When loading a template directly and not through a page
    222      * that resolves it, the top-level post ID and type context get set to that
    223      * of the template. Templates are just the structure of a site, and
    224      * they should not be available as post context because blocks like Post
    225      * Content would recurse infinitely.
     224     * When loading a template directly and not through a page that resolves it,
     225     * the top-level post ID and type context get set to that of the template.
     226     * Templates are just the structure of a site, and they should not be available
     227     * as post context because blocks like Post Content would recurse infinitely.
    226228     */
    227229    if ( isset( $context['postType'] ) && 'wp_template' === $context['postType'] ) {
  • trunk/src/wp-includes/class-wp-theme-json.php

    r51152 r51168  
    10991099        $this->theme_json = array_replace_recursive( $this->theme_json, $incoming_data );
    11001100
    1101         // The array_replace_recursive algorithm merges at the leaf level.
    1102         // For leaf values that are arrays it will use the numeric indexes for replacement.
    1103         // In those cases, we want to replace the existing with the incoming value, if it exists.
     1101        /*
     1102         * The array_replace_recursive() algorithm merges at the leaf level.
     1103         * For leaf values that are arrays it will use the numeric indexes for replacement.
     1104         * In those cases, we want to replace the existing with the incoming value, if it exists.
     1105         */
    11041106        $to_replace   = array();
    11051107        $to_replace[] = array( 'custom' );
  • trunk/src/wp-includes/theme-templates.php

    r51150 r51168  
    2323    }
    2424
    25     // Template slugs must be unique within the same theme.
    26     // TODO - Figure out how to update this to work for a multi-theme
    27     // environment.  Unfortunately using `get_the_terms` for the 'wp-theme'
    28     // term does not work in the case of new entities since is too early in
    29     // the process to have been saved to the entity.  So for now we use the
    30     // currently activated theme for creation.
     25    /*
     26     * Template slugs must be unique within the same theme.
     27     * TODO - Figure out how to update this to work for a multi-theme environment.
     28     * Unfortunately using `get_the_terms()` for the 'wp-theme' term does not work
     29     * in the case of new entities since is too early in the process to have been saved
     30     * to the entity. So for now we use the currently activated theme for creation.
     31     */
    3132    $theme = wp_get_theme()->get_stylesheet();
    3233    $terms = get_the_terms( $post_ID, 'wp_theme' );
Note: See TracChangeset for help on using the changeset viewer.