Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#60734 new enhancement

Deregistering Open Sans

Reported by: ecv80's profile ecv80 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4.3
Component: Script Loader Keywords:
Focuses: Cc:

Description (last modified by sabernhardt)

I have wasted an entire day trying to figure out why my Open Sans styles were not applying. This is counterproductive/suboptimal.

As it turns out, Open Sans was packed in WP back in 2014, which is fine by me. More info: #28478

However it is not immediately obvious one needs to wp_deregister_style('open-sans'); before he can register his own style.

Please, consider making an exception and make wp_register_style() automatically wp_deregister_style(X) if X equals 'open-sans'. Otherwise consider other courses of action that may prevent others from incurring in the same problem I did.

Thanks.

Change History (1)

#1 @sabernhardt
5 months ago

  • Component changed from General to Script Loader
  • Description modified (diff)
  • Summary changed from Open Sans mystery to Deregistering Open Sans
  • Type changed from feature request to enhancement

Hi and welcome to WordPress Core Trac!

When [37361] removed Open Sans from the admin, the script loader continued to register the 'open-sans' handle for any themes or plugins already using the stylesheet (ticket:36753#comment:6).

Directory searches found plugins and themes referring to an 'open-sans' style. Some of them enqueue/print the old Core stylesheet, some deregister it, and some make their own stylesheet.

Note: See TracTickets for help on using tickets.