Forums

Prevent user from deleting a category? (2 posts)

  1. ch3nyong
    Member
    Posted 1 year ago #

    hi,

    i am looking for a way to prevent user (or at least prompt a javascript confirmation) from deleting a category that my plugin is tied up to

    i only found the action "delete_category" to hook up from my plugin, but that will be triggered only After the category is deleted

    may i know if there are any equivalent action to "pre_delete_category" or something?

    thanks!

  2. Mark / t31os
    Moderator
    Posted 1 year ago #

    http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/taxonomy.php#L1345

    Categories ultimately get managed by the taxonomy/term functions, so that's where you need to be looking for pre-deletion actions..

    ;)

    Hope that helps..

Topic Closed

This topic has been closed to new replies.

About this Topic