#26104 closed defect (bug) (invalid)
created_term action hook only passes 1 parameter (should be 3)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
In the file wp-includes/taxonomy.php - Line: 2209
do_action("created_term", $term_id, $tt_id, $taxonomy);
Shows that the hook callback should expect 3 parameters but I only received 1.
I see these errors:
"PHP message: PHP Warning: Missing argument 2 for wiardweb_created_term()"
"PHP message: PHP Warning: Missing argument 3 for wiardweb_created_term()"
Have attached a sample callback.
Tested using Wordpress 3.7.1
Also the only docs I see relating to this hook is in the wp_insert_term reference...
http://codex.wordpress.org/Function_Reference/wp_insert_term
Attachments (1)
Change History (4)
#1
@
11 years ago
You'd need to specify how many parameters are you using, i.e.:
add_action('created_term', 'my_created_term', 10, 3);
Where 10
stands for priority (order of operations) and 3
is the number of arguments.