From e907e8d6d160fab5439adbc6d08b9f30aa468077 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Jan 2007 18:15:10 +0000 Subject: [PATCH] Cat ID filter relo. Props donncha. fixes #3591 git-svn-id: http://svn.automattic.com/wordpress/trunk@4749 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-db.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php index 7867c6f202..b39244366e 100644 --- a/wp-admin/admin-db.php +++ b/wp-admin/admin-db.php @@ -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 // 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 - $cat_ID = apply_filters('cat_id_filter', $cat_ID, $update); - - clean_category_cache($cat_ID); if ($update) { do_action('edit_category', $cat_ID); @@ -147,6 +144,10 @@ function wp_insert_category($catarr) { do_action('add_category', $cat_ID); } + $cat_ID = apply_filters('cat_id_filter', $cat_ID, $update); + + clean_category_cache($cat_ID); + return $cat_ID; }