widgets['WP_Widget_Recent_Comments'])) { remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style')); } } // Remove injected CSS from gallery function betube_gallery_style($css) { return preg_replace("!!s", '', $css); } // This removes the annoying […] to a Read More link function betube_excerpt_more($more) { global $post; // edit here if you like return ''. esc_html__('... Read more »', 'betube') .''; } // Stop WordPress from using the sticky class (which conflicts with Foundation), and style WordPress sticky posts using the .wp-sticky class instead function betube_sticky_class($classes) { if(in_array('sticky', $classes)) { $classes = array_diff($classes, array("sticky")); $classes[] = 'wp-sticky'; } return $classes; } add_filter('post_class','betube_sticky_class'); //This is a modified the_author_posts_link() which just returns the link. This is necessary to allow usage of the usual l10n process with printf() function betube_get_the_author_posts_link() { global $authordata; if ( !is_object( $authordata ) ) return false; $link = sprintf( '', get_author_posts_url( $authordata->ID, $authordata->user_nicename ), esc_attr( sprintf( __( 'Posts by %s', 'betube' ), get_the_author() ) ), // No further l10n needed, core will take care of this one get_the_author() ); return $link; }