Make WordPress Core


Ignore:
Timestamp:
01/11/2026 09:47:06 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: Only enqueue block editor assets in the admin.

Follow-up to [56300].

Props sabernhardt, flixos90, luisherranz, gautam23, huzaifaalmesbah, mukesh27, r1k0, SergeyBiryukov.
Fixes #60111.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php

    r60537 r61471  
    2424
    2525                // Enqueue color variables for editor.
    26                 add_action( 'enqueue_block_assets', array( $this, 'editor_custom_color_variables' ) );
     26                if ( is_admin() ) {
     27                        add_action( 'enqueue_block_assets', array( $this, 'editor_custom_color_variables' ) );
     28                }
    2729
    2830                // Add body-class if needed.
Note: See TracChangeset for help on using the changeset viewer.