WP_Query::is_preview() – Is the query for a post or page preview?

You appear to be a bot. Output may be restricted

Description

Is the query for a post or page preview?

Usage

$bool = WP_Query::is_preview();

Parameters

Returns

bool Whether the query is for a post or page preview.

Source

File name: wordpress/wp-includes/class-wp-query.php
Lines:

1 to 3 of 3
  public function is_preview() {
    return (bool) $this->WP_Query::is_preview;
  }
 

 View on GitHub View on Trac