/**
* Hide "featured" tag from the front-end.
*
- * Has to run on wp_loaded so that the preview filters of the customizer
+ * Has to run on wp_loaded so that the preview filters of the Customizer
* have a chance to alter the value.
*
* @static
return;
}
- $page_on_front = get_option( 'page_on_front' );
-
// Bail if the blog page is not the front page.
- if ( ! empty( $page_on_front ) ) {
+ if ( 'posts' !== get_option( 'show_on_front' ) ) {
return;
}
}
$settings = self::get_setting();
- foreach( $terms as $order => $term ) {
+ foreach ( $terms as $order => $term ) {
if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
unset( $terms[ $order ] );
}
}
$settings = self::get_setting();
- foreach( $terms as $order => $term ) {
+ foreach ( $terms as $order => $term ) {
if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
unset( $terms[ $term->term_id ] );
}
* @access public
* @since Twenty Fourteen 1.0
*
- * @param WP_Customize_Manager $wp_customize Theme Customizer object.
+ * @param WP_Customize_Manager $wp_customize Customizer object.
*/
public static function customize_register( $wp_customize ) {
$wp_customize->add_section( 'featured_content', array(