Make WordPress Core

Ticket #28627: 28627.2.diff

File 28627.2.diff, 1.0 KB (added by adamsilverstein, 11 years ago)
  • src/wp-admin/includes/revision.php

     
    199199                        $current_id = $revision->ID;
    200200                }
    201201
    202                 $revisions[ $revision->ID ] = array(
     202                $revisions_data = array(
    203203                        'id'         => $revision->ID,
    204204                        'title'      => get_the_title( $post->ID ),
    205205                        'author'     => $authors[ $revision->post_author ],
     
    210210                        'current'    => $current,
    211211                        'restoreUrl' => $can_restore ? $restore_link : false,
    212212                );
     213
     214                /**
     215                 * Filter the array of models used to load the revisions screen.
     216                 *
     217                 * @since 4.2.0
     218                 *
     219                 * @param array   $revisions_data The bootstrapped data for the revisions
     220                 *                                screen Backbone Collection.
     221                 * @param WP_Post $post           The revisions parent post object.
     222                 */
     223                $revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $post );
     224
    213225        }
    214226
    215227        /**