Changeset 1752 for trunk/wp-admin/post.php
- Timestamp:
- 10/06/2004 02:18:37 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/post.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1751 r1752 57 57 $post_status = $_POST['post_status']; 58 58 $post_name = $_POST['post_name']; 59 $post_parent = 0; 60 if (isset($_POST['parent_id'])) { 61 $post_parent = $_POST['parent_id']; 62 } 59 63 60 64 if (empty($post_status)) $post_status = 'draft'; … … 109 113 110 114 $postquery ="INSERT INTO $wpdb->posts 111 (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 )115 (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) 112 116 VALUES 113 ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt' )117 ('0', '$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') 114 118 "; 115 119 … … 195 199 } // end if publish 196 200 201 if ($post_status = 'static') { 202 generate_page_rewrite_rules(); 203 } 204 197 205 exit(); 198 206 break; … … 223 231 $pinged = $postdata->pinged; 224 232 $post_name = $postdata->post_name; 225 226 if ($post_status == 'static') { 227 include('edit-page-form.php'); 228 } else { 229 include('edit-form-advanced.php'); 230 } 233 $post_parent = $postdata->post_parent; 234 235 if ($post_status == 'static') { 236 include('edit-page-form.php'); 237 } else { 238 include('edit-form-advanced.php'); 239 } 231 240 232 241 $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'"); … … 287 296 if (empty($post_name)) { 288 297 $post_name = $post_title; 298 } 299 300 $post_parent = 0; 301 if (isset($_POST['parent_id'])) { 302 $post_parent = $_POST['parent_id']; 289 303 } 290 304 … … 354 368 to_ping = '$trackback', 355 369 post_modified = '$now', 356 post_modified_gmt = '$now_gmt' 370 post_modified_gmt = '$now_gmt', 371 post_parent = '$post_parent' 357 372 WHERE ID = $post_ID "); 358 373 … … 421 436 } 422 437 } // end if publish 438 439 if ($post_status = 'static') { 440 generate_page_rewrite_rules(); 441 } 423 442 424 443 do_action('edit_post', $post_ID);
Note: See TracChangeset
for help on using the changeset viewer.