Make WordPress Core

Changeset 55417


Ignore:
Timestamp:
02/23/2023 09:32:15 PM (13 months ago)
Author:
flixos90
Message:

Editor: Fix invalid parameters being passed to wp_register_style().

Boolean true is not a valid value for the $ver or $media parameters of wp_register_style().

Props sabernhardt, flixos90, hellofromtonya.
Fixes #57771. See #56990, #57688.

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

Legend:

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

    r55141 r55417  
    548548        : $selector . '{filter:' . $filter_property . ' !important;}';
    549549
    550     wp_register_style( $filter_id, false, array(), true, true );
     550    wp_register_style( $filter_id, false );
    551551    wp_add_inline_style( $filter_id, $filter_style );
    552552    wp_enqueue_style( $filter_id );
  • trunk/src/wp-includes/script-loader.php

    r55412 r55417  
    24522452    }
    24532453
    2454     wp_register_style( 'global-styles', false, array(), true, true );
     2454    wp_register_style( 'global-styles', false );
    24552455    wp_add_inline_style( 'global-styles', $stylesheet );
    24562456    wp_enqueue_style( 'global-styles' );
     
    29852985 */
    29862986function wp_enqueue_global_styles_css_custom_properties() {
    2987     wp_register_style( 'global-styles-css-custom-properties', false, array(), true, true );
     2987    wp_register_style( 'global-styles-css-custom-properties', false );
    29882988    wp_add_inline_style( 'global-styles-css-custom-properties', wp_get_global_stylesheet( array( 'variables' ) ) );
    29892989    wp_enqueue_style( 'global-styles-css-custom-properties' );
     
    30663066    // Combines Core styles.
    30673067    if ( ! empty( $compiled_core_stylesheet ) ) {
    3068         wp_register_style( $style_tag_id, false, array(), true, true );
     3068        wp_register_style( $style_tag_id, false );
    30693069        wp_add_inline_style( $style_tag_id, $compiled_core_stylesheet );
    30703070        wp_enqueue_style( $style_tag_id );
     
    30803080        if ( ! empty( $styles ) ) {
    30813081            $key = "wp-style-engine-$store_name";
    3082             wp_register_style( $key, false, array(), true, true );
     3082            wp_register_style( $key, false );
    30833083            wp_add_inline_style( $key, $styles );
    30843084            wp_enqueue_style( $key );
     
    37063706    if ( ! wp_theme_has_theme_json() ) {
    37073707        $suffix = wp_scripts_get_suffix();
    3708         wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css", array(), true );
     3708        wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css" );
    37093709        wp_enqueue_style( 'classic-theme-styles' );
    37103710    }
Note: See TracChangeset for help on using the changeset viewer.