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( 'artech_text_editor_css', get_template_directory_uri() . '/inc/customizer/custom-controls/controls/editor/css/artech-page-editor.css', array(),'artech'); wp_enqueue_script( 'artech_text_editor', get_template_directory_uri() . '/inc/customizer/custom-controls/controls/editor/js/artech-text-editor.js', array( 'jquery', 'customize-preview', ),'artech', true ); if ( $this->needsync === true ) { wp_enqueue_script( 'artech_controls_script', get_template_directory_uri() . '/inc/customizer/custom-controls/controls/editor/js/artech-update-controls.js', array( 'jquery', 'artech_text_editor' ),'artech', true ); wp_localize_script( 'artech_controls_script', 'requestpost', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'thumbnail_control' => 'artech_feature_thumbnail', // name of image control that needs sync 'editor_control' => 'Artech_Page_Editor', // name of control (theme_mod) that needs sync 'thumbnail_label' => esc_html__( 'About background', 'artech' ), // name of thumbnail control ) ); } } /** * Render the content on the theme customizer page */ public function render_content() { ?>