diff options
Diffstat (limited to 'wp-inst/wp-admin/post.php')
| -rw-r--r-- | wp-inst/wp-admin/post.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wp-inst/wp-admin/post.php b/wp-inst/wp-admin/post.php index bf6a15a..57cc2f9 100644 --- a/wp-inst/wp-admin/post.php +++ b/wp-inst/wp-admin/post.php @@ -27,6 +27,14 @@ if (false !== strpos($_SERVER['HTTP_REFERER'], 'edit-pages.php')) $submenu_file $editing = true; +if( $_POST[ 'cat_name' ] ) { + if ( current_user_can('manage_categories') ) { + $_POST[ 'category_parent' ] = 0; + $_POST[ 'category_description' ] = ''; + wp_insert_category($_POST); + } +} + switch($action) { case 'post': |
