如何在支持WP_Editor的WordPress中为术语创建自定义元框?我找不到合适的结果。
function bj_taxonomy_edit_meta_field($term) {
$t_id = $term->term_id;
$term_meta = get_option("taxonomy_$t_id");
?>
<tr class="form-field">
<th scope="row" valign="top"><label for="term_meta[custom_term_meta]"><?php _e('Case Studies Section', 'site'); ?></label></th>
<td>
<textarea name="term_meta[custom_term_meta]" id="term_meta[custom_term_meta]" rows="5" cols="40"><?php echo ($term_meta['custom_term_meta'] ) ? $term_meta['custom_term_meta'] : ''; ?></textarea>
<p class="bj-description"><?php _e('Enter a value for this field', 'site'); ?></p>
</td>
</tr>
<?php
}
add_action('practice-area_edit_form_fields', 'bj_taxonomy_edit_meta_field', 10, 2);