true ), 'names' ); foreach ( $taxonomies as $taxonomy ) { // Fields on the "Add new term" form. add_action( "{$taxonomy}_add_form_fields", array( $this, 'add_form_fields' ) ); // Fields on the "Edit term" form. add_action( "{$taxonomy}_edit_form_fields", array( $this, 'edit_form_fields' ), 10, 2 ); // Save on create. add_action( "created_{$taxonomy}", array( $this, 'save_term_meta' ), 10, 2 ); // Save on update. add_action( "edited_{$taxonomy}", array( $this, 'save_term_meta' ), 10, 2 ); } } /** * Render fields on the "Add new term" screen. * * @param string $taxonomy Current taxonomy slug. */ public function add_form_fields( $taxonomy ) { wp_nonce_field( 's1_seo_term_save', 's1_seo_term_nonce' ); ?>

0/60

0/160

term_id, self::META_TITLE, true ); $seo_desc = get_term_meta( $term->term_id, self::META_DESC, true ); ?>

/60

/160