kisukedeath

Action hook for custom tax edit / term

Jun 1st, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. do_action( "create_term",       $term_id, $tt_id, $taxonomy );
  2. do_action( "created_term",      $term_id, $tt_id, $taxonomy );
  3. do_action( "edited_term",       $term_id, $tt_id, $taxonomy );
  4. do_action( 'delete_term',       $term,    $tt_id, $taxonomy, $deleted_term );
  5. do_action( "create_$taxonomy",  $term_id, $tt_id );
  6. do_action( "created_$taxonomy", $term_id, $tt_id );
  7. do_action( "edited_$taxonomy",  $term_id, $tt_id );
  8. do_action( "delete_$taxonomy",  $term,    $tt_id, $deleted_term );
  9.  
  10. function wpse_created_term( $term_id, $tt_id, $taxonomy ) {
  11. }    
  12. function wpse_edited_term( $term_id, $tt_id, $taxonomy ) {
  13. }    
  14. function wpse_delete_term( $term_id, $tt_id, $taxonomy ) {
  15. }    
  16.  
  17. add_action( 'created_term', 'wpse_created_term', 10, 3 );
  18. add_action( 'edited_term', 'wpse_edited_term', 10, 3 );
  19. add_action( 'delete_term', 'wpse_delete_term', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment