Changeset 8266
- Timestamp:
- 02/18/2019 08:20:38 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r8207 r8266 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 );135 134 136 135 function init() { … … 156 155 157 156 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 }172 157 } 173 158
Note: See TracChangeset
for help on using the changeset viewer.