_show_post_preview

Filters the latest content for preview from the post autosave.

Description

_show_post_preview(); 

Usage

  1. if ( !function_exists( '_show_post_preview' ) ) { 
  2. require_once ABSPATH . WPINC . '/revision.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = _show_post_preview(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/revision.php  
  1. function _show_post_preview() { 
  2. if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) { 
  3. $id = (int) $_GET['preview_id']; 
  4.  
  5. if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) 
  6. wp_die( __('Sorry, you are not allowed to preview drafts.') ); 
  7.