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/script-loader.php

    r56139 r56194  
    5858        && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed;
    5959
    60     // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production)
    61     // or tinymce.min.js (when SCRIPT_DEBUG is true).
     60    /*
     61     * Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production)
     62     * or tinymce.min.js (when SCRIPT_DEBUG is true).
     63     */
    6264    if ( $compressed ) {
    6365        $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version );
     
    586588    $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' );
    587589
    588     // Do "by hand" translation from PHP array to js object.
    589     // Prevents breakage in some custom settings.
     590    /*
     591     * Do "by hand" translation from PHP array to js object.
     592     * Prevents breakage in some custom settings.
     593     */
    590594    $init_obj = '';
    591595    foreach ( $tinymce_settings as $key => $value ) {
     
    826830    $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) );
    827831
    828     // jQuery.
    829     // The unminified jquery.js and jquery-migrate.js are included to facilitate debugging.
     832    /*
     833     * jQuery.
     834     * The unminified jquery.js and jquery-migrate.js are included to facilitate debugging.
     835     */
    830836    $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.7.0' );
    831837    $scripts->add( 'jquery-core', "/wp-includes/js/jquery/jquery$suffix.js", array(), '3.7.0' );
    832838    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.4.1' );
    833839
    834     // Full jQuery UI.
    835     // The build process in 1.12.1 has changed significantly.
    836     // In order to keep backwards compatibility, and to keep the optimized loading,
    837     // the source files were flattened and included with some modifications for AMD loading.
    838     // A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'.
     840    /*
     841     * Full jQuery UI.
     842     * The build process in 1.12.1 has changed significantly.
     843     * In order to keep backwards compatibility, and to keep the optimized loading,
     844     * the source files were flattened and included with some modifications for AMD loading.
     845     * A notable change is that 'jquery-ui-core' now contains 'jquery-ui-position' and 'jquery-ui-widget'.
     846     */
    839847    $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$suffix.js", array( 'jquery' ), '1.13.2', 1 );
    840848    $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$suffix.js", array( 'jquery' ), '1.13.2', 1 );
     
    882890    $scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$suffix.js", array( 'jquery-ui-mouse' ), '1.13.2', 1 );
    883891
    884     // As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`.
    885     // Listed here for back-compat.
     892    /*
     893     * As of 1.12.1 `jquery-ui-position` and `jquery-ui-widget` are part of `jquery-ui-core`.
     894     * Listed here for back-compat.
     895     */
    886896    $scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.13.2', 1 );
    887897    $scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.13.2', 1 );
     
    916926    $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array( 'jquery' ), '1.1-20110113', 1 );
    917927
    918     // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
    919     // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
     928    /*
     929     * Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
     930     * It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
     931     */
    920932    $scripts->add( 'imagesloaded', '/wp-includes/js/imagesloaded.min.js', array(), '4.1.4', 1 );
    921933    $scripts->add( 'masonry', '/wp-includes/js/masonry.min.js', array( 'imagesloaded' ), '4.2.2', 1 );
     
    13391351    $scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js", array(), false, 1 );
    13401352
    1341     // To enqueue media-views or media-editor, call wp_enqueue_media().
    1342     // Both rely on numerous settings, styles, and templates to operate correctly.
     1353    /*
     1354     * To enqueue media-views or media-editor, call wp_enqueue_media().
     1355     * Both rely on numerous settings, styles, and templates to operate correctly.
     1356     */
    13431357    $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'clipboard' ), false, 1 );
    13441358    $scripts->set_translations( 'media-views' );
     
    16361650        'wp-components',
    16371651        'wp-editor',
    1638         // This need to be added before the block library styles,
    1639         // The block library styles override the "reset" styles.
     1652        /*
     1653         * This needs to be added before the block library styles,
     1654         * The block library styles override the "reset" styles.
     1655         */
    16401656        'wp-reset-editor-styles',
    16411657        'wp-block-library',
     
    27152731    $attributes_string    = '';
    27162732
    2717     // If HTML5 script tag is supported, only the attribute name is added
    2718     // to $attributes_string for entries with a boolean value, and that are true.
     2733    /*
     2734     * If HTML5 script tag is supported, only the attribute name is added
     2735     * to $attributes_string for entries with a boolean value, and that are true.
     2736     */
    27192737    foreach ( $attributes as $attribute_name => $attribute_value ) {
    27202738        if ( is_bool( $attribute_value ) ) {
     
    28972915            $style['css'] = file_get_contents( $style['path'] );
    28982916
    2899             // Check if the style contains relative URLs that need to be modified.
    2900             // URLs relative to the stylesheet's path should be converted to relative to the site's root.
     2917            /*
     2918             * Check if the style contains relative URLs that need to be modified.
     2919             * URLs relative to the stylesheet's path should be converted to relative to the site's root.
     2920             */
    29012921            $style['css'] = _wp_normalize_relative_css_links( $style['css'], $style['src'] );
    29022922
     
    37113731    $classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css";
    37123732
    3713     // This follows the pattern of get_block_editor_theme_styles,
    3714     // but we can't use get_block_editor_theme_styles directly as it
    3715     // only handles external files or theme files.
     3733    /*
     3734     * This follows the pattern of get_block_editor_theme_styles,
     3735     * but we can't use get_block_editor_theme_styles directly as it
     3736     * only handles external files or theme files.
     3737     */
    37163738    $classic_theme_styles_settings = array(
    37173739        'css'            => file_get_contents( $classic_theme_styles ),
Note: See TracChangeset for help on using the changeset viewer.