Cat ID filter relo. Props donncha. fixes #3591
git-svn-id: https://develop.svn.wordpress.org/trunk@4749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
21fdc53a8f
commit
e0e0a113ef
@ -136,9 +136,6 @@ function wp_insert_category($catarr) {
|
|||||||
// Keep in mind when using this filter and altering the cat_ID that the two queries above
|
// Keep in mind when using this filter and altering the cat_ID that the two queries above
|
||||||
// have already taken place with the OLD cat_ID
|
// have already taken place with the OLD cat_ID
|
||||||
// Also note that you may have post2cat entries with the old cat_ID if this is an update
|
// Also note that you may have post2cat entries with the old cat_ID if this is an update
|
||||||
$cat_ID = apply_filters('cat_id_filter', $cat_ID, $update);
|
|
||||||
|
|
||||||
clean_category_cache($cat_ID);
|
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
do_action('edit_category', $cat_ID);
|
do_action('edit_category', $cat_ID);
|
||||||
@ -147,6 +144,10 @@ function wp_insert_category($catarr) {
|
|||||||
do_action('add_category', $cat_ID);
|
do_action('add_category', $cat_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cat_ID = apply_filters('cat_id_filter', $cat_ID, $update);
|
||||||
|
|
||||||
|
clean_category_cache($cat_ID);
|
||||||
|
|
||||||
return $cat_ID;
|
return $cat_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user