Changeset 10725 for trunk/wp-includes/post.php
- Timestamp:
- 03/06/2009 12:50:19 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r10724 r10725 1500 1500 1501 1501 // expected_slashed (everything!) 1502 $fields = array( 'post_author' => '%d', 'post_date' => '%s', 'post_date_gmt' => '%s', 'post_content' => '%s', 'post_content_filtered' => '%s', 'post_title' => '%s', 1503 'post_excerpt' => '%s', 'post_status' => '%s', 'post_type' => '%s', 'comment_status' => '%s', 'ping_status' => '%s', 'post_password' => '%s', 'post_name' => '%s', 1504 'to_ping' => '%s', 'pinged' => '%s', 'post_modified' => '%s', 'post_modified_gmt' => '%s', 'post_parent' => '%d', 'menu_order' => '%d', 'guid' => '%s' ); 1505 $data = compact( array_keys( $fields) ); 1506 $data_formats = array_values( $fields ); 1502 $data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'guid' ) ); 1507 1503 $data = apply_filters('wp_insert_post_data', $data, $postarr); 1508 1504 $data = stripslashes_deep( $data ); 1509 error_log(var_export($data, true));1510 1505 $where = array( 'ID' => $post_ID ); 1511 $where_formats = array('%d'); 1512 1513 if ( $update ) { 1506 1507 if ($update) { 1514 1508 do_action( 'pre_post_update', $post_ID ); 1515 if ( false === $wpdb->update( $wpdb->posts, $data, $where , $data_formats, $where_formats) ) {1509 if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) { 1516 1510 if ( $wp_error ) 1517 1511 return new WP_Error('db_update_error', __('Could not update post in the database'), $wpdb->last_error); … … 1529 1523 } 1530 1524 } 1531 if ( false === $wpdb->insert( $wpdb->posts, $data , $data_formats) ) {1525 if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { 1532 1526 if ( $wp_error ) 1533 1527 return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)