描述:
判断当前是否为预览模式的框架内
用法:
<?php is_customize_preview(); ?>
参数:
None
示例:
if ( is_customize_preview() ) {
// Output a demo content
}
源文件:
function is_customize_preview() {
global $wp_customize;
return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
}