Make WordPress Core

Ticket #23352: add-revisions-link-to-publish-box.diff

File add-revisions-link-to-publish-box.diff, 1.0 KB (added by adamsilverstein, 12 years ago)

adds revisions link to publish box for testing

  • wp-admin/includes/meta-boxes.php

     
    178178        <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a>
    179179        <div id="timestampdiv" class="hide-if-js"><?php touch_time(($action == 'edit'), 1); ?></div>
    180180</div><?php // /misc-pub-section ?>
     181<?php endif;
     182
     183        $the_revisions = wp_get_post_revisions( $post->ID );
     184        $revision_count = count( $the_revisions );
     185        if ( post_type_supports( $post_type, 'revisions' ) && 0 < $revision_count ) :
     186?>
     187<div id="post-revisions-link" class="misc-pub-section" >
     188        <span id="revisions-link"><?php printf( _n( '%d Revision', '%d Revisions', $revision_count ), $revision_count ); ?></span>
     189        <a href="revision.php?revision=<?php echo key( $the_revisions ) ?>&action=edit" class="edit-revisions hide-if-no-js"><?php _e( 'View' ) ?></a>
     190</div>
    181191<?php endif; ?>
    182192
    183193<?php do_action('post_submitbox_misc_actions'); ?>