needsync = $args['needsync']; } } /** * Enqueue scripts * * @since 1.1.0 * @access public * @updated Changed wp_enqueue_scripts order and dependencies. */ public function enqueue() { wp_enqueue_style( 'atua_text_editor_css', get_template_directory_uri() . '/inc/customizer/controls/code/editor/css/atua-page-editor.css', array(),'atua'); wp_enqueue_script( 'atua_text_editor', get_template_directory_uri() . '/inc/customizer/controls/code/editor/js/atua-text-editor.js', array( 'jquery', 'customize-preview', ),'atua', true ); if ( $this->needsync === true ) { wp_enqueue_script( 'atua_controls_script', get_template_directory_uri() . '/inc/customizer/controls/code/editor/js/atua-update-controls.js', array( 'jquery', 'atua_text_editor' ),'atua', true ); wp_localize_script( 'atua_controls_script', 'requestpost', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'thumbnail_control' => 'atua_feature_thumbnail', // name of image control that needs sync 'editor_control' => 'Atua_Page_Editor', // name of control (theme_mod) that needs sync 'thumbnail_label' => esc_html__( 'About background', 'atua' ), // name of thumbnail control ) ); } } /** * Render the content on the theme customizer page */ public function render_content() { ?>