WP_Customize_Setting::is_current_blog_previewed() WordPress Method
The WP_Customize_Setting::is_current_blog_previewed() method is used to determine if the current WordPress blog is being previewed in the Customizer. This is useful for settings that only apply to the current site, such as site title and description.
WP_Customize_Setting::is_current_blog_previewed() #
Return true if the current site is not the same as the previewed site.
Return
(bool) If preview() has been called.
Source
File: wp-includes/class-wp-customize-setting.php
public function is_current_blog_previewed() { if ( ! isset( $this->_previewed_blog_id ) ) { return false; } return ( get_current_blog_id() === $this->_previewed_blog_id ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.2.0 | Introduced. |