Ticket #1481: categories_1.5.1.2_mp001_newhook.patch
| File categories_1.5.1.2_mp001_newhook.patch, 891 bytes (added by , 21 years ago) |
|---|
-
categories.php
old new 34 34 $cat = intval($_POST['cat']); 35 35 36 36 $wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')"); 37 do_action('add_category', $wpdb->insert_id); 37 38 38 39 header('Location: categories.php?message=1#addcat'); 39 40 break; … … 57 58 $wpdb->query("UPDATE $wpdb->categories SET category_parent = '$cat_parent' WHERE category_parent = '$cat_ID'"); 58 59 // TODO: Only set categories to general if they're not in another category already 59 60 $wpdb->query("UPDATE $wpdb->post2cat SET category_id='1' WHERE category_id='$cat_ID'"); 61 do_action('delete_category', $cat_ID); 60 62 61 63 header('Location: categories.php?message=2'); 62 64