On this page
is_customize_preview(): bool
Whether the site is being previewed in the Customizer.
Return
bool True if the site is being previewed in the Customizer, false otherwise.
Source
File: wp-includes/theme.php. View all references
function is_customize_preview() {
global $wp_customize;
return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Widget_Text::render_control_template_scripts() wp-includes/widgets/class-wp-widget-text.php | Render form template scripts. |
| wp_custom_css_cb() wp-includes/theme.php | Renders the Custom CSS style element. |
| get_custom_header_markup() wp-includes/theme.php | Retrieves the markup for a custom header. |
| the_custom_header_markup() wp-includes/theme.php | Prints the markup for a custom header. |
| get_custom_logo() wp-includes/general-template.php | Returns a custom logo, linked to home unless the theme supports removing the link on the home page. |
| WP_Customize_Selective_Refresh::handle_render_partials_request() wp-includes/customize/class-wp-customize-selective-refresh.php | Handles the Ajax request to return the rendered partials for the requested placements. |
| wp_admin_bar_customize_menu() wp-includes/admin-bar.php | Adds the “Customize” link to the Toolbar. |
| wp_site_icon() wp-includes/general-template.php | Displays site icon meta tags. |
| _custom_background_cb() wp-includes/theme.php | Default custom background callback. |
| WP_Widget_Recent_Comments::__construct() wp-includes/widgets/class-wp-widget-recent-comments.php | Sets up a new Recent Comments widget instance. |
| _wp_menu_item_classes_by_context() wp-includes/nav-menu-template.php | Adds the class property classes for the current context, if applicable. |
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_customize_preview