WordPress.org

Make WordPress Core

Ticket #24742: 24742.diff

File 24742.diff, 1.1 KB (added by DrewAPicture, 12 months ago)

first pass

  • wp-admin/includes/revision.php

     
    11<?php 
     2/** 
     3 * WordPress Administration Revisions API. 
     4 * 
     5 * @package WordPress 
     6 * @subpackage Administrator 
     7 */ 
    28 
     9/** 
     10 * Get the revision UI diff 
     11 * 
     12 * @param object $post The post object. 
     13 * @param int $compare_from The post id to compare from. 
     14 * @param int $compare_to The post id to come to. 
     15 * 
     16 * @return array|bool 
     17 */ 
    318function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { 
    419        if ( ! $post = get_post( $post ) ) 
    520                return false; 
     
    6176        return $return; 
    6277} 
    6378 
     79/** 
     80 * Prepare revisions for JavaScript 
     81 * 
     82 * @param object $post The post object. 
     83 * @param int $selected_revision_id The selected revision id. 
     84 * @param int $from (optional) The revision id to compare from. 
     85 * 
     86 * @return array An associative array of revision data. 
     87 */ 
    6488function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) { 
    6589        $post = get_post( $post ); 
    6690        $revisions = array();