Changeset 30346 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 11/14/2014 09:33:50 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r30202 r30346 178 178 */ 179 179 function edit_post( $post_data = null ) { 180 global $wpdb; 180 181 181 182 if ( empty($post_data) ) … … 318 319 update_post_meta( $post_ID, '_edit_last', get_current_user_id() ); 319 320 320 wp_update_post( $post_data ); 321 $success = wp_update_post( $post_data ); 322 // If the save failed, see if we can sanity check the main fields and try again 323 if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) { 324 $fields = array( 'post_title', 'post_content', 'post_excerpt' ); 325 326 foreach( $fields as $field ) { 327 if ( isset( $post_data[ $field ] ) ) { 328 $post_data[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field, $post_data[ $field ] ); 329 } 330 } 331 332 wp_update_post( $post_data ); 333 } 321 334 322 335 // Now that we have an ID we can fix any attachment anchor hrefs
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)