<taxonomy>_pre_add_form
Fires before the Add Term form for all taxonomies.
Description
The dynamic portion(s) of the hook name refer to the taxonomy slug.
Parameters (1)
- 0. $taxonomy (string)
- The taxonomy slug.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( '{$taxonomy}_pre_add_form', $taxonomy );
- The following example is for adding a hook callback.
- // define the <taxonomy>_pre_add_form callback
- function action_taxonomy_pre_add_form( $taxonomy ) {
- // make action magic happen here...
- };
- // add the action
- add_action( "{$taxonomy}_pre_add_form", 'action_taxonomy_pre_add_form', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( "{$taxonomy}_pre_add_form", 'action_taxonomy_pre_add_form', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-admin/edit-tags.php
- do_action( "{$taxonomy}_pre_add_form", $taxonomy );