Make WordPress Core


Ignore:
Timestamp:
07/10/2023 11:09:16 PM (15 months ago)
Author:
audrasjb
Message:

Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191], [56192], [56193].

Props costdev, audrasjb.
See #58459.

File:
1 edited

Legend:

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

    r56142 r56194  
    4646
    4747    if ( is_array( $wp_theme_directories ) && count( $wp_theme_directories ) > 1 ) {
    48         // Make sure the active theme wins out, in case search_theme_directories() picks the wrong
    49         // one in the case of a conflict. (Normally, last registered theme root wins.)
     48        /*
     49         * Make sure the active theme wins out, in case search_theme_directories() picks the wrong
     50         * one in the case of a conflict. (Normally, last registered theme root wins.)
     51         */
    5052        $current_theme = get_stylesheet();
    5153        if ( isset( $theme_directories[ $current_theme ] ) ) {
     
    511513            }
    512514            if ( file_exists( $theme_root . '/' . $dir . '/style.css' ) ) {
    513                 // wp-content/themes/a-single-theme
    514                 // wp-content/themes is $theme_root, a-single-theme is $dir.
     515                /*
     516                 * wp-content/themes/a-single-theme
     517                 * wp-content/themes is $theme_root, a-single-theme is $dir.
     518                 */
    515519                $found_themes[ $dir ] = array(
    516520                    'theme_file' => $dir . '/style.css',
     
    519523            } else {
    520524                $found_theme = false;
    521                 // wp-content/themes/a-folder-of-themes/*
    522                 // wp-content/themes is $theme_root, a-folder-of-themes is $dir, then themes are $sub_dirs.
     525                /*
     526                 * wp-content/themes/a-folder-of-themes/*
     527                 * wp-content/themes is $theme_root, a-folder-of-themes is $dir, then themes are $sub_dirs.
     528                 */
    523529                $sub_dirs = @ scandir( $theme_root . '/' . $dir );
    524530                if ( ! $sub_dirs ) {
     
    539545                    $found_theme                           = true;
    540546                }
    541                 // Never mind the above, it's just a theme missing a style.css.
    542                 // Return it; WP_Theme will catch the error.
     547                /*
     548                 * Never mind the above, it's just a theme missing a style.css.
     549                 * Return it; WP_Theme will catch the error.
     550                 */
    543551                if ( ! $found_theme ) {
    544552                    $found_themes[ $dir ] = array(
     
    588596        $theme_root = get_raw_theme_root( $stylesheet_or_template );
    589597        if ( $theme_root ) {
    590             // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
    591             // This gives relative theme roots the benefit of the doubt when things go haywire.
     598            /*
     599             * Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
     600             * This gives relative theme roots the benefit of the doubt when things go haywire.
     601             */
    592602            if ( ! in_array( $theme_root, (array) $wp_theme_directories, true ) ) {
    593603                $theme_root = WP_CONTENT_DIR . $theme_root;
     
    18331843    $background = set_url_scheme( get_background_image() );
    18341844
    1835     // $color is the saved custom color.
    1836     // A default has to be specified in style.css. It will not be printed here.
     1845    /*
     1846     * $color is the saved custom color.
     1847     * A default has to be specified in style.css. It will not be printed here.
     1848     */
    18371849    $color = get_background_color();
    18381850
     
    25082520                break;
    25092521
    2510             // All that's left now are posts (besides attachments).
    2511             // Not a default case for the sake of clarity and future work.
     2522            /*
     2523             * All that's left now are posts (besides attachments).
     2524             * Not a default case for the sake of clarity and future work.
     2525             */
    25122526            case 'posts':
    25132527                foreach ( $config[ $type ] as $id => $item ) {
     
    27362750            unset( $args[0]['__jit'] );
    27372751
    2738             // Merge in data from previous add_theme_support() calls.
    2739             // The first value registered wins. (A child theme is set up first.)
     2752            /*
     2753             * Merge in data from previous add_theme_support() calls.
     2754             * The first value registered wins. (A child theme is set up first.)
     2755             */
    27402756            if ( isset( $_wp_theme_features['custom-header'] ) ) {
    27412757                $args[0] = wp_parse_args( $_wp_theme_features['custom-header'][0], $args[0] );
    27422758            }
    27432759
    2744             // Load in the defaults at the end, as we need to insure first one wins.
    2745             // This will cause all constants to be defined, as each arg will then be set to the default.
     2760            /*
     2761             * Load in the defaults at the end, as we need to insure first one wins.
     2762             * This will cause all constants to be defined, as each arg will then be set to the default.
     2763             */
    27462764            if ( $jit ) {
    27472765                $args[0] = wp_parse_args( $args[0], $defaults );
     
    27902808            }
    27912809
    2792             // If headers are supported, and we still don't have a defined width or height,
    2793             // we have implicit flex sizes.
     2810            /*
     2811             * If headers are supported, and we still don't have a defined width or height,
     2812             * we have implicit flex sizes.
     2813             */
    27942814            if ( $jit ) {
    27952815                if ( empty( $args[0]['width'] ) && empty( $args[0]['flex-width'] ) ) {
     
    34883508    $messenger_channel = null;
    34893509
    3490     // Value false indicates UUID should be determined after_setup_theme
    3491     // to either re-use existing saved changeset or else generate a new UUID if none exists.
     3510    /*
     3511     * Value false indicates UUID should be determined after_setup_theme
     3512     * to either re-use existing saved changeset or else generate a new UUID if none exists.
     3513     */
    34923514    $changeset_uuid = false;
    34933515
    3494     // Set initially fo false since defaults to true for back-compat;
    3495     // can be overridden via the customize_changeset_branching filter.
     3516    /*
     3517     * Set initially fo false since defaults to true for back-compat;
     3518     * can be overridden via the customize_changeset_branching filter.
     3519     */
    34963520    $branching = false;
    34973521
Note: See TracChangeset for help on using the changeset viewer.