[wp-trac] [WordPress Trac] #60734: Deregistering Open Sans (was: Open Sans mystery)

WordPress Trac noreply at wordpress.org
Sat Mar 9 10:31:21 UTC 2024


#60734: Deregistering Open Sans
---------------------------+------------------------------
 Reporter:  ecv80          |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:  6.4.3
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by sabernhardt):

 * type:  feature request => enhancement
 * component:  General => Script Loader


Old description:

> 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: https://core.trac.wordpress.org/ticket/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.

New description:

 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.

--

Comment:

 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
 [https://wpdirectory.net/search/01HRHB373BKE08METV1MD27PS7 plugins] and
 [https://wpdirectory.net/search/01HRH2MN7RBDD0RCVC8DXYWAK2 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60734#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list