Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'intro_edit_form_fields', "intro_add_term_field");
- function intro_add_term_field( $term ){
- $intro = get_term_meta( $term->term_id, 'intro_de', true );
- echo '<tr class="form-field">
- <th scope="row"><label for="intro_de">Nome tedesco</label></th>
- <td><input type="text" name="intro_de" value="'.$intro.'" />
- <p class="description">Nome del termine in tedesco</p></td>
- </tr>';
- }
- add_action( 'saved_intro', 'update_intro');
- function update_intro ( $term_id ) {
- update_term_meta( $term_id, 'intro_de', sanitize_text_field ( $_POST['intro_de'] ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment