当然,您可以使用customize_controls_enqueue_scripts 钩子加载自定义CSS和JS。
这是制作400px面板的一个示例:
文件:sample-theme/css/customizer-controls.css
.wp-full-overlay.expanded {
margin-left: 400px;
}
.wp-full-overlay-sidebar {
min-width: 400px;
}
.wp-full-overlay.collapsed .wp-full-overlay-sidebar {
margin-left: -400px;
}
文件:
sample-theme/functions.php/**
* Enqueue style for customized customizer.
*/
function sample_theme_customize_enqueue() {
wp_enqueue_style( \'custom-customize\', get_theme_file_uri( \'css/sample-theme-customizer-controls.css\' ) );
}
add_action( \'customize_controls_enqueue_scripts\', \'sample_theme_customize_enqueue\' );