From 9436737d0405cd3235bbc7144989025289da5ad1 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 24 Jan 2005 05:36:20 +0000 Subject: [PATCH] Fix for menu_order - http://mosquito.wordpress.org/view.php?id=740 git-svn-id: https://develop.svn.wordpress.org/trunk@2122 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 85162350b7..3742271969 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -36,10 +36,14 @@ case 'post': $post_status = $_POST['post_status']; $post_name = $_POST['post_name']; $post_parent = 0; + $menu_order = 0; if ( isset($_POST['parent_id']) ) $post_parent = $_POST['parent_id']; + if ( isset($_POST['menu_order']) ) + $menu_order = $_POST['menu_order']; + if ( empty($post_status) ) $post_status = 'draft'; // Double-check @@ -91,9 +95,9 @@ case 'post': } $postquery ="INSERT INTO $wpdb->posts - (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt, post_parent) + (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt, post_parent, menu_order) VALUES - ('$post_ID', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt', '$post_parent') + ('$post_ID', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt', '$post_parent', '$menu_order') "; $result = $wpdb->query($postquery);