[Plugin: Simple Term Meta] Meta is not deleted when term is

Here we will discuss about Wordpress plugins development and their support
  • Ads

[Plugin: Simple Term Meta] Meta is not deleted when term is

Postby joselin » Tue Aug 10, 2010 11:06 pm

When deleting a term, the term meta isn't deleted from the DB.

I solved this by adding these lines to your file. Maybe you want to add them or solve the problem in another manner:

Code: Select all
add_action('delete_term', 'simple_post_meta_delete_term');
function simple_post_meta_delete_term($term_id) {

   global $wpdb;
   $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->termmeta WHERE term_id = %d", $term_id));

}

http://wordpress.org/extend/plugins/simple-term-meta/
joselin
Jr. Member
Jr. Member
 
Posts: 208
Joined: Thu Jul 29, 2010 6:07 am

  • Ads

Return to Wordpress Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron