GC_Customize_Manager::enqueue_control_scripts()
最后更新于:2021-11-27 00:54:18
GC_Customize_Manager::enqueue_control_scripts()Enqueue scripts for customize controls.
源文件
文件: gc-includes/class-gc-customize-manager.php
public function enqueue_control_scripts() {
foreach ( $this->controls as $control ) {
$control->enqueue();
}
if ( ! is_multisite() && ( current_user_can( 'install_themes' ) || current_user_can( 'update_themes' ) || current_user_can( 'delete_themes' ) ) ) {
gc_enqueue_script( 'updates' );
gc_localize_script(
'updates',
'_gcUpdatesItemCounts',
array(
'totals' => gc_get_update_data(),
)
);
}
}