Make WordPress Core

Ticket #15230: pre_post_insert.patch

File pre_post_insert.patch, 674 bytes (added by pbearne, 9 years ago)

refesh

  • src/wp-includes/post.php

     
    33533353                                $data['ID'] = $import_id;
    33543354                        }
    33553355                }
     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 );
    33563364                if ( false === $wpdb->insert( $wpdb->posts, $data ) ) {
    33573365                        if ( $wp_error ) {
    33583366                                return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);