Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug with delete_term_meta API (meta name was required) #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Tax-meta-class/Tax-meta-class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,8 @@ public function update_tax_meta($term_id,$key,$value){
public function delete_taxonomy_metadata($term,$term_id) {
delete_option( 'tax_meta_'.$term_id );
if ( function_exists( 'delete_term_meta') ){
delete_term_meta( $term_id );
foreach( $this->_fields as $field )
delete_term_meta( $term_id, $field );
}
}

Expand Down Expand Up @@ -1816,4 +1817,4 @@ function get_tax_meta_all( $term_id){
$t_id = (is_object($term_id))? $term_id->term_id: $term_id;
return get_option( 'tax_meta_'.$t_id,array());
}
}
}