Make WordPress Core

Ticket #13382: 13382.2.diff

File 13382.2.diff, 1.2 KB (added by SergeyBiryukov, 9 years ago)
  • src/wp-includes/revision.php

     
    4343                 * and 'post_author'.
    4444                 *
    4545                 * @since 2.6.0
     46                 * @since 4.4.0 The `$post` parameter was added.
    4647                 *
    47                  * @param array $fields List of fields to revision. Contains 'post_title',
    48                  *                      'post_content', and 'post_excerpt' by default.
     48                 * @param array      $fields List of fields to revision. Contains 'post_title',
     49                 *                           'post_content', and 'post_excerpt' by default.
     50                 * @param null|array $post   A post array being processed for insertion as a post revision.
     51                 *                           Null if no post was passed to the function.
    4952                 */
    50                 $fields = apply_filters( '_wp_post_revision_fields', $fields );
     53                $fields = apply_filters( '_wp_post_revision_fields', $fields, $post );
    5154
    5255                // WP uses these internally either in versioning or elsewhere - they cannot be versioned
    5356                foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect )