Changeset 7933
- Timestamp:
- 12/04/2018 06:53:56 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r7864 r7933 132 132 add_action( 'init', __NAMESPACE__ . '\\init' ); 133 133 add_action( 'widgets_init', __NAMESPACE__ . '\\widgets_init' ); 134 add_action( 'wp_default_styles', __NAMESPACE__ . '\\remove_dashicons_styles', 11 ); 134 135 135 136 function init() { … … 155 156 156 157 add_filter( 'syntaxhighlighter_htmlresult', __NAMESPACE__ . '\\syntaxhighlighter_htmlresult' ); 158 } 159 160 /** 161 * Makes 'dashicons' a noop script on the frontend to prevent getting enqueued. 162 * 163 * The global W.org header already includes the dashicons stylesheet. 164 * 165 * @param WP_Scripts $scripts WP_Scripts object. 166 */ 167 function remove_dashicons_styles( &$scripts ) { 168 if ( ! is_admin() ) { 169 $scripts->remove( 'dashicons' ); 170 $scripts->add( 'dashicons', '' ); 171 } 157 172 } 158 173
Note: See TracChangeset
for help on using the changeset viewer.