Make WordPress Core


Ignore:
Timestamp:
03/14/2026 07:53:29 AM (5 months ago)
Author:
audrasjb
Message:

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

This changeset introduces the wp_admin_bar_add_color_scheme_to_front_end() which is hooked on admin_bar_init in order to use the CSS from admin color schemes on the admin bar on front-end, as inline styles.

Props sabernhardt, huzaifaalmesbah, audrasjb, johnbillion, noruzzaman, JeffPaul, joedolson, huzaifaalmesbah, amesplant, r1k0, shailu25.
Fixes #64762.

File:
1 edited

Legend:

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

    r61985 r62025  
    709709add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // Back-compat for themes not using `wp_body_open`.
    710710add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
     711add_action( 'admin_bar_init', 'wp_admin_bar_add_color_scheme_to_front_end', 0 );
    711712
    712713// Former admin filters that can also be hooked on the front end.
Note: See TracChangeset for help on using the changeset viewer.