[wp-hackers] howto delete category via administrator panel

Uwiuw Bakawan.com uwiuw at yahoo.com.sg
Fri Mar 12 23:32:31 UTC 2010


 
i'm sorry i put wrong information. in my previous email, i mention about post. What i meant is about delete category via dashboard >> categories

so, about the term_taxonomy_id, should i 
1. retrieve the delete category ID value from 'init' 
2. took it child category id via get_category such as

foreach ( get_category() as $category ) {
      if ( $category->parent == $delete_parent_cat_ID ) {
               //do the job here
      }
}


3. delete all of its child category post then delete the child 

is there any better approach then this ? 

On Sat, 13/3/10, scribu <scribu at gmail.com> wrote:

> From: scribu <scribu at gmail.com>
> Subject: Re: [wp-hackers] howto delete category via administrator panel
> To: wp-hackers at lists.automattic.com
> Date: Saturday, 13 March, 2010, 6:53 AM
> On Sat, Mar 13, 2010 at 12:36 AM,
> Uwiuw Bakawan.com <uwiuw at yahoo.com.sg>wrote:
> 
> > i have try 'delete_category' and 'delete_term' but
> it's only return the ID
> > of deleted category.
> >
> > Is there any hook to get this id before it get delete
> or at least got the
> > cache of its former child category ID ?
> >
> 
> The child category references the parent category, not the
> other way around.
> So all you need is the term_taxonomy_id.
> 
> See the wp_term_taxonomy.parent column.
> 
> 
> -- 
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


      New Email names for you! 
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/


More information about the wp-hackers mailing list