WordPress.org

Make WordPress Core

Changeset 23866


Ignore:
Timestamp:
03/29/2013 04:31:33 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Move _show_post_preview() back next to _set_preview(). see #23539.

File:
1 edited

Legend:

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

    r23862 r23866  
    508508
    509509    return $post;
     510}
     511
     512function _show_post_preview() {
     513
     514    if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) {
     515        $id = (int) $_GET['preview_id'];
     516
     517        if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
     518            wp_die( __('You do not have permission to preview drafts.') );
     519
     520        add_filter('the_preview', '_set_preview');
     521    }
    510522}
    511523
     
    643655}
    644656
    645 
    646 function _show_post_preview() {
    647 
    648     if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) {
    649         $id = (int) $_GET['preview_id'];
    650 
    651         if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
    652             wp_die( __('You do not have permission to preview drafts.') );
    653 
    654         add_filter('the_preview', '_set_preview');
    655     }
    656 }
    657 
    658657/**
    659658 * Determines if the specified post's most recent revision matches the post (by checking post_modified).
Note: See TracChangeset for help on using the changeset viewer.