WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/24/2016 12:43:31 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Revisions: Clean up _wp_post_revision_fields():

  • Move the array processing to a new function, _wp_post_revision_data().
  • Make both functions accept a post array or a WP_Post object.
  • Always apply the _wp_post_revision_fields filter and pass the post data to it.

Fixes #13382.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/revision.php

    r35387 r36659  
    5656    $return = array();
    5757
    58     foreach ( _wp_post_revision_fields() as $field => $name ) {
     58    foreach ( _wp_post_revision_fields( $post ) as $field => $name ) {
    5959        /**
    6060         * Contextually filter a post revision field.
Note: See TracChangeset for help on using the changeset viewer.