Make WordPress Core


Ignore:
Timestamp:
05/11/2026 12:46:02 PM (3 months ago)
Author:
wildworks
Message:

Toolbar: Revert add CSS from admin color scheme on front-end.

The implementation issues a server-side HTTP request on every front-end page load and extracts the toolbar CSS via fragile substring matching. Alternatives are too large to land this late in the release cycle, so the fix is deferred to a future release.

Reverts [62025].

Props desrosj, jorbin, mukesh27, sabernhardt, wildworks.

See #64762.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/wpStyleLoaderSrc.php

    r62025 r62349  
    1313        /**
    1414         * Tests that PHP warnings are not thrown when wp_style_loader_src() is called
    15          * before the `$_wp_admin_css_colors` global is set within the admin.
     15         * before the `$_wp_admin_css_colors` global is set.
    1616         *
    1717         * The warnings that we should not see:
     
    2020         *
    2121         * @ticket 61302
    22          * @ticket 64762
    2322         */
    2423        public function test_without_wp_admin_css_colors_global() {
    25                 if ( is_admin() ) {
    26                         $this->assertFalse( wp_style_loader_src( '', 'colors' ) );
    27                 } else {
    28                         $this->assertStringContainsString( '/colors.css', wp_style_loader_src( '', 'colors' ) );
    29                 }
     24                $this->assertFalse( wp_style_loader_src( '', 'colors' ) );
    3025        }
    3126}
Note: See TracChangeset for help on using the changeset viewer.