WordPress.org

Make WordPress Core

Ticket #21963: 21963.5.diff

File 21963.5.diff, 1.6 KB (added by kpdesign, 7 years ago)

Restore hook docs removed in r28579

  • src/wp-includes/post.php

     
    31473147        // expected_slashed (everything!)
    31483148        $data = compact( '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', 'post_mime_type', 'guid' );
    31493149
    3150         /**
    3151          * Filter slashed post data just before it is inserted into the database.
    3152          *
    3153          * @since 2.7.0
    3154          *
    3155          * @param array $data    Array of slashed post data.
    3156          * @param array $postarr Array of sanitized, but otherwise unmodified post data.
    3157          */
    31583150        if ( 'attachment' === $post_type ) {
     3151                /**
     3152                 * Filter attachment post data before it is updated in or added to the database.
     3153                 *
     3154                 * @since 3.9.0
     3155                 *
     3156                 * @param array $data    An array of sanitized attachment post data.
     3157                 * @param array $postarr An array of unsanitized attachment post data.
     3158                 */
    31593159                $data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
    31603160        } else {
     3161                /**
     3162                 * Filter slashed post data just before it is inserted into the database.
     3163                 *
     3164                 * @since 2.7.0
     3165                 *
     3166                 * @param array $data    An array of slashed post data.
     3167                 * @param array $postarr An array of sanitized, but otherwise unmodified post data.
     3168                 */
    31613169                $data = apply_filters( 'wp_insert_post_data', $data, $postarr );
    31623170        }
    31633171        $data = wp_unslash( $data );