Make WordPress Core

Opened 8 months ago

Last modified 6 weeks ago

#59626 new defect (bug)

admin-bar-css not following codex

Reported by: brianbrown's profile brianbrown Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.3.3
Component: Themes Keywords: close 2nd-opinion
Focuses: Cc:

Description (last modified by sabernhardt)

I have noticed that when the path to the admin-bar-css is changed via define('TEMPLATEPATH') / define('STYLESHEETPATH') hook(s) it is not followed when generating .../wp-includes/css/admin-bar.min.css which looks for the file at the original location, ignoring any change(s).

Change History (3)

#1 @SergeyBiryukov
8 months ago

  • Component changed from Filesystem API to Themes

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Could you share the Codex article you are referring to?

Just to clarify, the TEMPLATEPATH and STYLESHEETPATH constants are only used for locating files in the current theme, they indeed do not affect any other files like wp-includes/css/admin-bar.min.css.

These constants will be deprecated in WP 6.4 in favor of the template_directory and stylesheet_directory filters, see [56635] / #18298.

#2 @sabernhardt
8 months ago

  • Description modified (diff)

A search found translations of the old "Edit wp-config.php" Codex article, which mentioned these two constants among Additional Defined Constants "that can be defined, but probably shouldn't be."

I cannot edit the Thai version, but I probably could remove those two lines from other translations.

Also, the stylesheet directory function page has a downvoted user note that suggested using the STYLESHEETPATH constant.

#3 @sabernhardt
6 weeks ago

  • Keywords close 2nd-opinion added

The Codex might be fully replaced soon, but for now I removed those two lines from the Slovak, French, Croatian, Italian, Brazilian Portuguese, Russian and Chinese translation pages.

Note: See TracTickets for help on using tickets.