
如何修复MAMP本地环境phpMyAdmin不工作错误
add_term_meta ( $term_id, $meta_key, $meta_value, $unique = false )
add_term_meta – 在WordPress中为一个术语添加元数据。它需要三个参数:要添加元数据的术语的ID,要添加的元数据的名称,以及元数据的值。
为一个术语添加元数据。
function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) { if ( wp_term_is_shared( $term_id ) ) { return new WP_Error( 'ambiguous_term_id', __( 'Term meta cannot be added to terms that are shared between taxonomies.' ), $term_id ); } return add_metadata( 'term', $term_id, $meta_key, $meta_value, $unique ); }