Ticket #15230: pre_post_insert.patch
File pre_post_insert.patch, 674 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/post.php
3353 3353 $data['ID'] = $import_id; 3354 3354 } 3355 3355 } 3356 /** 3357 * Fires immediately before an existing post is updated in the database. 3358 * 3359 * @since 4.6.0 3360 * 3361 * @param array $data Array of unslashed post data. 3362 */ 3363 do_action( 'pre_post_insert', $data ); 3356 3364 if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { 3357 3365 if ( $wp_error ) { 3358 3366 return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);