widgets['WP_Widget_Recent_Comments'] ) ) { remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } } add_action( 'wp_head', 'odin_remove_recent_comments_style', 1 ); /** * Remove injected CSS from gallery. */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * Add rel="nofollow" and remove rel="category". */ function odin_modify_category_rel( $text ) { $search = array( 'rel="category"', 'rel="category tag"' ); $text = str_replace( $search, 'rel="nofollow"', $text ); return $text; } add_filter( 'wp_list_categories', 'odin_modify_category_rel' ); add_filter( 'the_category', 'odin_modify_category_rel' ); /** * Add rel="nofollow" and remove rel="tag". */ function odin_modify_tag_rel( $taglink ) { return str_replace( 'rel="tag">', 'rel="nofollow">', $taglink ); } add_filter( 'wp_tag_cloud', 'odin_modify_tag_rel' ); add_filter( 'the_tags', 'odin_modify_tag_rel' ); /** * Filter function used to remove the tinymce emoji plugin. * * @param array $plugins * @return array Difference betwen the two arrays */ function disable_emojis_tinymce( $plugins ) { return ( is_array( $plugins ) ) ? array_diff( $plugins, array( 'wpemoji' ) ) : array(); } add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );