Ticket #26732: 26732.2.patch
File 26732.2.patch, 1.3 KB (added by , 11 years ago) |
---|
-
wp-content/themes/twentyfourteen/inc/featured-content.php
91 91 add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) ); 92 92 add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ) ); 93 93 add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) ); 94 add_action( 'after_switch_theme', array( __CLASS__, 'after_switch_theme' ) ); 94 95 } 95 96 96 97 /** … … 513 514 if ( $term ) { 514 515 $output['tag-id'] = $term->term_id; 515 516 } else { 516 $new_tag = wp_ create_tag( $input['tag-name']);517 $new_tag = wp_insert_term( $input['tag-name'], 'post_tag' ); 517 518 518 519 if ( ! is_wp_error( $new_tag ) && isset( $new_tag['term_id'] ) ) { 519 520 $output['tag-id'] = $new_tag['term_id']; … … 557 558 return $quantity; 558 559 } 559 560 561 public static function after_switch_theme() { 562 add_option( 'featured-content', self::validate_settings( self::get_setting() ) ); 563 } 564 560 565 } // Featured_Content 561 566 562 567 Featured_Content::setup();