Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php

    r46827 r47122  
    8181                    echo '<span class="cat-tags-links">';
    8282
    83                         // Make sure there's more than one category before displaying.
     83                    // Make sure there's more than one category before displaying.
    8484                    if ( $categories_list && twentyseventeen_categorized_blog() ) {
    8585                        echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
     
    134134        // Find out the id and set it up during a selective refresh.
    135135        global $twentyseventeencounter;
    136         $id                     = str_replace( 'panel_', '', $partial->id );
     136
     137        $id = str_replace( 'panel_', '', $partial->id );
     138
    137139        $twentyseventeencounter = $id;
    138140    }
     
    149151    } elseif ( is_customize_preview() ) {
    150152        // The output placeholder anchor.
    151         /* translators: %s: The section ID. */
    152         echo '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel' . $id . '" id="panel' . $id . '"><span class="twentyseventeen-panel-title">' . sprintf( __( 'Front Page Section %s Placeholder', 'twentyseventeen' ), $id ) . '</span></article>';
     153        printf(
     154            '<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel%1$s" id="panel%1$s">' .
     155            '<span class="twentyseventeen-panel-title">%2$s</span></article>',
     156            $id,
     157            /* translators: %s: The section ID. */
     158            sprintf( __( 'Front Page Section %s Placeholder', 'twentyseventeen' ), $id )
     159        );
    153160    }
    154161}
     
    205212     * Fire the wp_body_open action.
    206213     *
    207      * Added for backwards compatibility to support pre 5.2.0 WordPress versions.
     214     * Added for backward compatibility to support pre-5.2.0 WordPress versions.
    208215     *
    209216     * @since Twenty Seventeen 2.2
Note: See TracChangeset for help on using the changeset viewer.