WP_Widget::is_preview

SummerySummery

Determines whether the current request is inside the Customizer preview.

Syntax

WP_Widget::is_preview()

DescriptionDescription

If true — the current request is inside the Customizer preview, then the object cache gets suspended and widgets should check this to decide whether they should store anything persistently to the object cache, to transients, or anywhere else.

ReturnReturn

(bool) True if within the Customizer preview, false if not.

SourceSource

File: wp-includes/class-wp-widget.php


			

ChangelogChangelog

Changelog
Version Description
3.9.0 Introduced.
Scroll to Top