esc_url( admin_url( 'admin-ajax.php' ) ), 'nonce' => wp_create_nonce( 'alpha-selective' ), ) ); } /** * load custom css * * @since 1.0 */ public function load_global_custom_css() { wp_enqueue_style( 'alpha-preview-custom', ALPHA_FRAMEWORK_ADMIN_URI . '/customizer/preview-custom.css' ); wp_add_inline_style( 'alpha-preview-custom', wp_strip_all_tags( wp_specialchars_decode( alpha_get_option( 'custom_css' ) ) ) ); } /** * Add CSS for Customizer Options * * @since 1.0 */ public function load_styles() { wp_enqueue_style( 'alpha-customizer', alpha_framework_uri( '/admin/customizer/customizer' . ( is_rtl() ? '-rtl' : '' ) . '.min.css' ), null, ALPHA_VERSION, 'all' ); wp_enqueue_style( 'alpha-magnific-popup' ); } /** * Add JS for Customizer Options * * @since 1.0 */ public function load_scripts() { wp_enqueue_script( 'alpha-customizer', alpha_framework_uri( '/admin/customizer/customizer' . ALPHA_JS_SUFFIX ), array(), ALPHA_VERSION, true ); wp_localize_script( 'alpha-customizer', 'alpha_customizer_vars', array( 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), 'nonce' => wp_create_nonce( 'alpha-customizer' ), ) ); } /** * Save theme options * * @since 1.0 */ public function save_theme_options() { ob_start(); include alpha_framework_path( ALPHA_FRAMEWORK_ADMIN . '/customizer/dynamic/dynamic_vars.php' ); global $wp_filesystem; // Initialize the WordPress filesystem, no more using file_put_contents function if ( empty( $wp_filesystem ) ) { require_once( ABSPATH . '/wp-admin/includes/file.php' ); WP_Filesystem(); } try { $target = wp_upload_dir()['basedir'] . '/' . ALPHA_NAME . '_styles/dynamic_vars.min.css'; $target_path = dirname( $target ); if ( ! file_exists( $target_path ) ) { wp_mkdir_p( $target_path ); } // check file mode and make it writable. if ( is_writable( $target_path ) == false ) { @chmod( get_theme_file_path( $target ), 0755 ); } if ( file_exists( $target ) ) { if ( is_writable( $target ) == false ) { @chmod( $target, 0755 ); } @unlink( $target ); } $wp_filesystem->put_contents( $target, ob_get_clean(), FS_CHMOD_FILE ); } catch ( Exception $e ) { var_dump( $e ); var_dump( 'error occured while saving dynamic css vars.' ); } } public function customize_register( $wp_customize ) { $this->wp_customize = $wp_customize; } /** * Import theme options * * @since 1.0 */ public function import_options() { if ( ! $this->wp_customize->is_preview() ) { wp_send_json_error( 'not_preview' ); } if ( ! check_ajax_referer( 'alpha-customizer', 'nonce', false ) ) { wp_send_json_error( 'invalid_nonce' ); } if ( empty( $_FILES['file'] ) || empty( $_FILES['file']['name'] ) ) { wp_send_json_error( 'Empty file pathname' ); } $filename = $_FILES['file']['name']; if ( empty( $_FILES['file']['tmp_name'] ) || '.json' !== substr( $filename, -5 ) ) { wp_send_json_error( 'invalid_type' ); } // filesystem global $wp_filesystem; // Initialize the WordPress filesystem, no more using file_put_contents function if ( empty( $wp_filesystem ) ) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } $options = $wp_filesystem->get_contents( $_FILES['file']['tmp_name'] ); if ( $options ) { $options = json_decode( $options, true ); } if ( $options ) { update_option( 'theme_mods_' . get_option( 'stylesheet' ), $options ); wp_send_json_success(); } else { wp_send_json_error( 'invalid_type' ); } } /** * Get menus * * @since 1.0 */ public function get_menus() { $nav_menus = wp_get_nav_menus(); $menus = array(); foreach ( $nav_menus as $menu ) { if ( ! preg_match( '/[^a-z\d]/i', $menu->name ) ) { // only for English (demos) $menus[ $menu->slug ] = esc_html( $menu->name ); } else { $menus[ $menu->term_id ] = esc_html( $menu->name ); } } return $menus; } /** * Export theme options. * * @since 1.0 */ public function export_options() { if ( ! $this->wp_customize->is_preview() ) { wp_send_json_error( 'not_preview' ); } if ( ! check_ajax_referer( 'alpha-customizer', 'nonce', false ) ) { wp_send_json_error( 'invalid_nonce' ); } header( 'Content-Description: File Transfer' ); header( 'Content-type: application/txt' ); header( 'Content-Disposition: attachment; filename="alpha_theme_options_backup_' . date( 'Y-m-d' ) . '.json"' ); header( 'Content-Transfer-Encoding: binary' ); header( 'Expires: 0' ); header( 'Cache-Control: must-revalidate' ); header( 'Pragma: public' ); echo json_encode( get_theme_mods() ); exit; } /** * Reset theme options * * @since 1.0 */ public function reset_options() { if ( ! $this->wp_customize->is_preview() ) { wp_send_json_error( 'not_preview' ); } if ( ! check_ajax_referer( 'alpha-customizer', 'nonce', false ) ) { wp_send_json_error( 'invalid_nonce' ); } remove_theme_mods(); // Delete compiled css in uploads/alpha_style directory. global $wp_filesystem; if ( empty( $wp_filesystem ) ) { require_once( ABSPATH . '/wp-admin/includes/file.php' ); WP_Filesystem(); } try { $wp_filesystem->delete( wp_upload_dir()['basedir'] . '/' . ALPHA_NAME . '_styles', true ); } catch ( Exception $e ) { wp_send_json_error( 'error occured while deleting compiled css.' ); } wp_send_json_success(); } /** * Get Page Links * * @since 1.0 */ public function add_local_vars( $vars ) { $home_url = esc_js( home_url() ); $blog_url = ''; $post_url = ''; $shop_url = ''; $cart_url = ''; $checkout_url = ''; $product_url = ''; $post = get_posts( array( 'posts_per_page' => 1 ) ); if ( is_array( $post ) && count( $post ) ) { $blog_url = esc_js( get_post_type_archive_link( 'post' ) ); $post_url = esc_js( get_permalink( $post[0] ) ); } // @start feature: fs_plugin_woocommerce if ( class_exists( 'WooCommerce' ) ) { $shop_url = esc_js( wc_get_page_permalink( 'shop' ) ); $cart_url = esc_js( wc_get_page_permalink( 'cart' ) ); $checkout_url = esc_js( wc_get_page_permalink( 'checkout' ) ); $product_url = ''; $product = get_posts( array( 'posts_per_page' => 1, 'post_type' => 'product', ) ); if ( is_array( $product ) && count( $product ) ) { $product_url = esc_js( get_permalink( $product[0] ) ); } } // @end feature: fs_plugin_woocommerce $vars['page_links'] = apply_filters( 'alpha_customize_page_links', array( 'blog_archive' => array( 'url' => $blog_url, 'is_panel' => false, ), 'blog_single' => array( 'url' => $post_url, 'is_panel' => false, ), 'products_archive' => array( 'url' => $shop_url, 'is_panel' => false, ), 'product_type' => array( 'url' => $shop_url, 'is_panel' => false, ), 'product_detail' => array( 'url' => $product_url, 'is_panel' => false, ), 'wc_cart' => array( 'url' => $cart_url, 'is_panel' => false, ), 'woocommerce_checkout' => array( 'url' => $checkout_url, 'is_panel' => false, ), ) ); return $vars; } /** * Get Navigator Template * * @since 1.0 */ public function customizer_navigator() { $nav_items = alpha_get_option( 'navigator_items' ); ob_start(); ?>

array( 'title' => esc_html__( 'Style', 'alpus' ), 'priority' => 20, ), 'layouts' => array( 'title' => esc_html__( 'Page Layouts', 'alpus' ), 'priority' => 30, ), 'nav_menus' => array( 'title' => esc_html__( 'Menus', 'alpus' ), 'priority' => 40, ), 'widgets' => array( 'title' => esc_html__( 'Widgets', 'alpus' ), 'priority' => 100, ), 'advanced' => array( 'title' => esc_html__( 'Miscellaneous', 'alpus' ), 'priority' => 120, ), 'features' => array( 'title' => esc_html__( 'Features', 'alpus' ), 'priority' => 110, ), ); $sections = array( // General Panel 'general' => array( 'title' => esc_html__( 'General', 'alpus' ), 'priority' => 10, ), // Header Panel 'header_footer' => array( 'title' => esc_html__( 'Header & Footer', 'alpus' ), 'priority' => 10, ), // Blog Panel 'blog' => array( 'title' => esc_html__( 'Blog', 'alpus' ), 'priority' => 50, ), // Custom CSS & JS Panel 'custom_css_js' => array( 'title' => esc_html__( 'Custom CSS & JS', 'alpus' ), 'priority' => 130, ), 'maintenance' => array( 'title' => esc_html__( 'Maintenance', 'alpus' ), 'priority' => 140, ), // Change Orders 'title_tagline' => array( 'title' => esc_html__( 'Site Identity', 'alpus' ), 'priority' => 150, ), 'static_front_page' => array( 'title' => esc_html__( 'Homepage Settings', 'alpus' ), 'priority' => 160, ), 'colors' => array( 'title' => esc_html__( 'Color', 'alpus' ), 'priority' => 160, ), 'header_image' => array( 'title' => esc_html__( 'Header Image', 'alpus' ), 'priority' => 170, ), 'background_image' => array( 'title' => esc_html__( 'Background Image', 'alpus' ), 'priority' => 180, ), // Style Panel 'color' => array( 'title' => esc_html__( 'Color', 'alpus' ), 'panel' => 'style', 'priority' => 10, ), 'typo' => array( 'title' => esc_html__( 'Typography', 'alpus' ), 'panel' => 'style', 'priority' => 20, ), 'title_bar' => array( 'title' => esc_html__( 'Page Title Bar', 'alpus' ), 'panel' => 'style', 'priority' => 30, ), 'breadcrumb' => array( 'title' => esc_html__( 'Breadcrumbs', 'alpus' ), 'panel' => 'style', 'priority' => 40, ), // Menus 'menu_labels' => array( 'title' => esc_html__( 'Menu Labels', 'alpus' ), 'panel' => 'nav_menus', 'priority' => 3, ), 'mobile_menu' => array( 'title' => esc_html__( 'Mobile Menu', 'alpus' ), 'panel' => 'nav_menus', 'priority' => 6, ), 'mobile_bar' => array( 'title' => esc_html__( 'Mobile Sticky Icon Bar', 'alpus' ), 'priority' => 8, 'panel' => 'nav_menus', ), // Features 'ajax_filter' => array( 'title' => esc_html__( 'Ajax Filter', 'alpus' ), 'panel' => 'features', 'priority' => 10, ), 'lazyload' => array( 'title' => esc_html__( 'Lazy Load', 'alpus' ), 'priority' => 50, 'panel' => 'features', ), 'quickview' => array( 'title' => esc_html__( 'Quickview', 'alpus' ), 'panel' => 'features', 'priority' => 60, ), 'search' => array( 'title' => esc_html__( 'Search', 'alpus' ), 'priority' => 70, 'panel' => 'features', ), 'sociallogin' => array( 'title' => esc_html__( 'Social Login', 'alpus' ), 'priority' => 80, 'panel' => 'features', ), // Advanced Panel 'images' => array( 'title' => esc_html__( 'Image Size & Quality', 'alpus' ), 'priority' => 30, 'panel' => 'advanced', ), 'reset_options' => array( 'title' => esc_html__( 'Import/Export/Reset', 'alpus' ), 'priority' => 40, 'panel' => 'advanced', ), 'seo' => array( 'title' => esc_html__( 'SEO', 'alpus' ), 'priority' => 50, 'panel' => 'advanced', ), 'white_label' => array( 'title' => esc_html__( 'White Label', 'alpus' ), 'priority' => 60, 'panel' => 'advanced', ), ); $fields = array( // General / Site Layout 'cs_site_layout' => array( 'section' => 'general', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Site Layout', 'alpus' ) . '

', ), 'site_type' => array( 'section' => 'general', 'type' => 'radio_image', 'label' => esc_html__( 'Site Type', 'alpus' ), 'transport' => 'postMessage', 'choices' => array( 'full' => ALPHA_ASSETS . '/images/admin/customizer/site-full.png', 'boxed' => ALPHA_ASSETS . '/images/admin/customizer/site-boxed.png', 'framed' => ALPHA_ASSETS . '/images/admin/customizer/site-framed.png', ), ), 'site_width' => array( 'section' => 'general', 'type' => 'text', 'label' => esc_html__( 'Site Width (px)', 'alpus' ), 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'site_type', 'operator' => '!=', 'value' => 'full', ), ), ), 'site_gap' => array( 'section' => 'general', 'type' => 'text', 'label' => esc_html__( 'Site Gap (px)', 'alpus' ), 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'site_type', 'operator' => '!=', 'value' => 'full', ), ), ), 'site_bg' => array( 'section' => 'general', 'type' => 'background', 'label' => esc_html__( 'Site Background', 'alpus' ), 'tooltip' => esc_html__( 'Change background of outside the frame.', 'alpus' ), 'default' => '', 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'site_type', 'operator' => '!=', 'value' => 'full', ), ), ), 'content_bg' => array( 'section' => 'general', 'type' => 'background', 'label' => esc_html__( 'Content Background', 'alpus' ), 'default' => '', 'transport' => 'postMessage', ), // General / Site Content 'cs_general_content_title' => array( 'section' => 'general', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Container Width', 'alpus' ) . '

', ), 'container' => array( 'section' => 'general', 'type' => 'text', 'label' => esc_html__( 'Container Width (px)', 'alpus' ), 'transport' => 'postMessage', ), 'container_fluid' => array( 'section' => 'general', 'type' => 'text', 'label' => esc_html__( 'Container Fluid Width (px)', 'alpus' ), 'transport' => 'postMessage', ), 'cs_gutter_spacing' => array( 'section' => 'general', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Gutter Spacing', 'alpus' ) . '

' . sprintf( esc_html__( 'Set site gutter spacing (default gap spacing between columns, projects, products etc) in Elementor %1$sSite Settings%2$s/Layout/Layout Settings', 'alpus' ), '', '' ) . '

' . '' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '', ), // Header & Footer 'cs_header_title' => array( 'section' => 'header_footer', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Header', 'alpus' ) . '

' . esc_html__( 'Create your header template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Builders' ) ? '' . esc_html__( 'Header Builder', 'alpus' ) . '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), 'cs_footer_title' => array( 'section' => 'header_footer', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Footer', 'alpus' ) . '

' . esc_html__( 'Create your footer template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Builders' ) ? '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '
' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . esc_html__( 'Footer Builder', 'alpus' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), // Style / Color 'cs_colors_title' => array( 'section' => 'color', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Colors', 'alpus' ) . '

', ), 'primary_color' => array( 'section' => 'color', 'type' => 'color', 'label' => esc_html__( 'Primary Color', 'alpus' ), 'choices' => array( 'alpha' => true, ), 'transport' => 'postMessage', ), 'secondary_color' => array( 'section' => 'color', 'type' => 'color', 'label' => esc_html__( 'Secondary Color', 'alpus' ), 'choices' => array( 'alpha' => true, ), 'transport' => 'postMessage', ), 'dark_color' => array( 'section' => 'color', 'type' => 'color', 'label' => esc_html__( 'Dark Color', 'alpus' ), 'choices' => array( 'alpha' => true, ), 'transport' => 'postMessage', ), 'light_color' => array( 'section' => 'color', 'type' => 'color', 'label' => esc_html__( 'Light Color', 'alpus' ), 'choices' => array( 'alpha' => true, ), 'transport' => 'postMessage', ), // Style / Typography 'cs_typo_default_font' => array( 'section' => 'typo', 'type' => 'custom', 'default' => '

' . esc_html__( 'Default Typography', 'alpus' ) . '

', ), 'typo_default' => array( 'section' => 'typo', 'type' => 'typography', 'label' => '', 'choices' => apply_filters( 'alpha_kirki_typo_control_choices', array() ), 'transport' => 'postMessage', ), 'cs_typo_heading' => array( 'section' => 'typo', 'type' => 'custom', 'default' => '

' . esc_html__( 'Heading Typography', 'alpus' ) . '

', ), 'typo_heading' => array( 'section' => 'typo', 'type' => 'typography', 'label' => '', 'choices' => apply_filters( 'alpha_kirki_typo_control_choices', array() ), 'transport' => 'postMessage', ), 'cs_typo_google_title' => array( 'section' => 'typo', 'type' => 'custom', 'default' => '

' . esc_html__( 'Google Fonts', 'alpus' ) . '

', ), 'cs_typo_google_desc' => array( 'section' => 'typo', 'type' => 'custom', 'default' => '

' . esc_html__( 'Select google fonts use throughout the site.', 'alpus' ) . '

', ), 'typo_custom_part' => array( 'section' => 'typo', 'type' => 'radio-buttonset', 'default' => '1', 'transport' => 'postMessage', 'choices' => array( '1' => esc_html__( 'Font 1', 'alpus' ), '2' => esc_html__( 'Font 2', 'alpus' ), '3' => esc_html__( 'Font 3', 'alpus' ), ), ), 'typo_custom1' => array( 'section' => 'typo', 'type' => 'typography', 'label' => esc_html__( 'Font 1', 'alpus' ), 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'typo_custom_part', 'operator' => '==', 'value' => '1', ), ), ), 'typo_custom2' => array( 'section' => 'typo', 'type' => 'typography', 'label' => esc_html__( 'Font 2', 'alpus' ), 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'typo_custom_part', 'operator' => '==', 'value' => '2', ), ), ), 'typo_custom3' => array( 'section' => 'typo', 'type' => 'typography', 'label' => esc_html__( 'Font 3', 'alpus' ), 'transport' => 'postMessage', 'active_callback' => array( array( 'setting' => 'typo_custom_part', 'operator' => '==', 'value' => '3', ), ), ), // Style / Title Bar 'cs_ptb_bar_style_title' => array( 'section' => 'title_bar', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Title Bar Style', 'alpus' ) . '

', 'transport' => 'postMessage', ), 'ptb_height' => array( 'section' => 'title_bar', 'type' => 'number', 'label' => esc_html__( 'Title Bar Height (px)', 'alpus' ), 'transport' => 'postMessage', ), 'ptb_bg' => array( 'section' => 'title_bar', 'type' => 'background', 'label' => esc_html__( 'Title Bar Background', 'alpus' ), 'transport' => 'postMessage', ), 'cs_ptb_typo_title' => array( 'section' => 'title_bar', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Title Bar Typography', 'alpus' ) . '

', 'transport' => 'postMessage', ), 'typo_ptb_title' => array( 'section' => 'title_bar', 'type' => 'typography', 'label' => esc_html__( 'Page Title', 'alpus' ), 'choices' => apply_filters( 'alpha_kirki_typo_control_choices', array() ), 'transport' => 'postMessage', ), 'typo_ptb_subtitle' => array( 'section' => 'title_bar', 'type' => 'typography', 'label' => esc_html__( 'Page Subtitle', 'alpus' ), 'choices' => apply_filters( 'alpha_kirki_typo_control_choices', array() ), 'transport' => 'postMessage', ), // Style / Breadcrumb 'cs_ptb_breadcrumb_style_title' => array( 'section' => 'breadcrumb', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Breadcrumb', 'alpus' ) . '

', 'transport' => 'postMessage', ), 'ptb_delimiter' => array( 'section' => 'breadcrumb', 'type' => 'text', 'label' => esc_html__( 'Breadcrumb Delimiter', 'alpus' ), 'transport' => 'postMessage', ), 'typo_ptb_breadcrumb' => array( 'section' => 'breadcrumb', 'type' => 'typography', 'label' => esc_html__( 'Breadcrumb Typography', 'alpus' ), 'choices' => apply_filters( 'alpha_kirki_typo_control_choices', array() ), 'transport' => 'postMessage', ), // Menus / Menu Labels 'cs_menu_labels_title' => array( 'section' => 'menu_labels', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Menu Labels', 'alpus' ) . '

', ), 'menu_labels' => array( 'section' => 'menu_labels', 'type' => 'text', 'label' => esc_html__( 'Menu Labels', 'alpus' ), 'transport' => 'refresh', 'sanitize_callback' => 'wp_strip_all_tags', ), 'cs_menu_labels' => array( 'section' => 'menu_labels', 'type' => 'custom', 'default' => $this->get_edit_menu_label_control(), ), 'cs_new_label' => array( 'section' => 'menu_labels', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'New Label', 'alpus' ) . '

', ), 'cs_new_menu_label' => array( 'section' => 'menu_labels', 'type' => 'custom', 'default' => $this->get_new_menu_label_control(), ), // Menus / Mobile Menu 'cs_mobile_menu_title' => array( 'section' => 'mobile_menu', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Mobile Menu', 'alpus' ) . '

' . esc_html__( 'Create New Menu', 'alpus' ) . '', 'transport' => 'postMessage', ), 'mobile_menu_items' => array( 'section' => 'mobile_menu', 'type' => 'sortable', 'label' => esc_html__( 'Mobile Menus', 'alpus' ), 'transport' => 'refresh', 'choices' => $this->get_menus(), ), // Menus / Mobile Sticky Icon Bar 'cs_mobile_bar_title' => array( 'section' => 'mobile_bar', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Mobile Icon Bar', 'alpus' ) . '

', 'transport' => 'postMessage', ), 'mobile_bar_icons' => array( 'section' => 'mobile_bar', 'type' => 'sortable', 'label' => esc_html__( 'Mobile Bar Icons', 'alpus' ), 'transport' => 'refresh', 'choices' => array( 'menu' => esc_html__( 'Mobile Menu Toggle', 'alpus' ), 'home' => esc_html__( 'Home', 'alpus' ), 'shop' => esc_html__( 'Shop', 'alpus' ), 'wishlist' => esc_html__( 'Wishlist', 'alpus' ), 'account' => esc_html__( 'Account', 'alpus' ), 'compare' => esc_html__( 'Compare', 'alpus' ), 'cart' => esc_html__( 'Cart', 'alpus' ), 'search' => esc_html__( 'Search', 'alpus' ), 'top' => esc_html__( 'To Top', 'alpus' ), ), ), 'mobile_bar_menu_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Menu Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_menu_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Menu Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_home_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Home Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_home_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Home Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_shop_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Shop Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_shop_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Shop Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_wishlist_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Wishlist Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_wishlist_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Wishlist Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_account_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Account Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_account_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Account Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_cart_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Cart Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_cart_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Cart Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_search_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Search Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_search_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'Search Icon', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_top_label' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'To Top Label', 'alpus' ), 'transport' => 'postMessage', ), 'mobile_bar_top_icon' => array( 'section' => 'mobile_bar', 'type' => 'text', 'label' => esc_html__( 'To Top Icon', 'alpus' ), 'transport' => 'postMessage', ), // Blog 'cs_blog_single_title' => array( 'section' => 'blog', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Single Post', 'alpus' ) . '

' . esc_html__( 'Create your post single page template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Builders' ) ? '' . esc_html__( 'Single Builder', 'alpus' ) . '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), 'cs_blog_archive_title' => array( 'section' => 'blog', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Blog', 'alpus' ) . '

' . esc_html__( 'Create your post archive page template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Builders' ) ? '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '
' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . esc_html__( 'Archive Builder', 'alpus' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), // Custom CSS, JS 'custom_css' => array( 'section' => 'custom_css_js', 'type' => 'code', 'label' => esc_html__( 'CSS code', 'alpus' ), 'transport' => 'postMessage', 'choices' => array( 'language' => 'css', 'theme' => 'monokai', ), ), // Maintenance Mode 'is_maintenance' => array( 'section' => 'maintenance', 'type' => 'toggle', 'label' => esc_html__( 'Maintenance Mode', 'alpus' ), 'tooltip' => esc_html__( 'This mode is for showing alternative page during the maintenance of the site.', 'alpus' ), ), 'maintenance_page' => array( 'section' => 'maintenance', 'type' => 'select', 'label' => esc_html__( 'Select a Maintenance Page', 'alpus' ), 'choices' => Kirki_Helper::get_posts( array( 'post_type' => 'page', 'post_status' => 'publish', ) ), 'active_callback' => array( array( 'setting' => 'is_maintenance', 'operator' => '==', 'value' => true, ), ), ), // Custom Image Size 'cs_image_quality_title' => array( 'section' => 'images', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Image Quality and Threshold', 'alpus' ) . '

', ), 'image_quality' => array( 'section' => 'images', 'type' => 'number', 'label' => esc_html__( 'Image Quality(%)', 'alpus' ), 'tooltip' => esc_html__( 'Quality level between 0 (low) and 100 (high) of the JPEG. After changing this value, please install and run the Regenerate Thumbnails plugin once.', 'alpus' ), 'choices' => array( 'min' => 0, 'max' => 100, ), ), 'big_image_threshold' => array( 'section' => 'images', 'type' => 'number', 'label' => esc_html__( 'Big Image Size Threshold(px)', 'alpus' ), 'tooltip' => esc_html__( 'Threshold for image height and width in pixels. WordPress will scale down newly uploaded images to this values as max-width or max-height. Set to "0" to disable the threshold completely.', 'alpus' ), 'choices' => array( 'min' => 0, ), ), 'cs_image_size_title' => array( 'section' => 'images', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Custom Image Size', 'alpus' ) . '

', ), 'custom_image_sizes' => array( 'section' => 'images', 'type' => 'repeater', 'row_label' => array( 'type' => 'field', 'value' => esc_attr__( 'image size', 'alpus' ), 'field' => 'size_name', ), 'fields' => array( 'size_name' => array( 'type' => 'text', 'label' => esc_html__( 'Image Size Name', 'alpus' ), ), 'width' => array( 'type' => 'number', 'label' => esc_html__( 'Width (px)', 'alpus' ), ), 'height' => array( 'type' => 'number', 'label' => esc_html__( 'Height (px)', 'alpus' ), ), ), ), // 'custom_image_size' => array( // 'section' => 'images', // 'type' => 'dimensions', // 'label' => esc_html__( 'Register Custom Image Size (px)', 'alpus' ), // 'tooltip' => esc_html__( 'Don\'t forget to regenerate previously uploaded images.', 'alpus' ), // ), // Import/Export/Reset Options 'cs_import_title' => array( 'section' => 'reset_options', 'type' => 'custom', 'default' => '

' . esc_html__( 'Import Options', 'alpus' ) . '

', ), 'import_src' => array( 'section' => 'reset_options', 'type' => 'custom', 'transport' => 'postMessage', 'label' => esc_html__( 'Please select source option file to import', 'alpus' ), 'default' => '', ), 'cs_import_option' => array( 'section' => 'reset_options', 'type' => 'custom', 'default' => '', ), 'cs_export_title' => array( 'section' => 'reset_options', 'type' => 'custom', 'default' => '

' . esc_html__( 'Export Options', 'alpus' ) . '

', ), 'cs_export_option' => array( 'section' => 'reset_options', 'type' => 'custom', 'default' => '

' . esc_html__( 'Export theme options', 'alpus' ) . '

' . esc_html__( 'Download Theme Options', 'alpus' ) . '', ), 'cs_reset_title' => array( 'section' => 'reset_options', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Reset Options', 'alpus' ) . '

', ), 'cs_reset_option' => array( 'section' => 'reset_options', 'type' => 'custom', 'label' => '', 'default' => '', ), // SEO / Options 'cs_nofollow_title' => array( 'section' => 'seo', 'type' => 'custom', 'default' => '

' . esc_html__( 'Use by search engines for ranking', 'alpus' ) . '

', ), 'share_link_nofollow' => array( 'section' => 'seo', 'type' => 'toggle', 'label' => esc_html__( 'Share & Social Links', 'alpus' ), 'tooltip' => esc_html__( 'Add "nofollow" attribute to social links for SEO.', 'alpus' ), ), 'menu_item_nofollow' => array( 'section' => 'seo', 'type' => 'toggle', 'label' => esc_html__( 'Mobile Menu Items', 'alpus' ), 'tooltip' => esc_html__( 'Add "nofollow" attribute to mobile menu items for SEO.', 'alpus' ), ), //White Label / Options 'cs_white_label_title' => array( 'section' => 'white_label', 'type' => 'custom', 'default' => '

' . esc_html__( 'White Label', 'alpus' ) . '

', ), 'white_label_title' => array( 'section' => 'white_label', 'type' => 'text', 'label' => esc_html__( 'White Label', 'alpus' ), 'tooltip' => esc_html__( 'Theme name in AdminPanel', 'alpus' ), ), 'white_label_icon' => array( 'section' => 'white_label', 'type' => 'image', 'label' => esc_html__( 'White Icon', 'alpus' ), 'tooltip' => esc_html__( 'Theme icon in Admin Menu and Admin Bar', 'alpus' ), ), 'white_label_logo' => array( 'section' => 'white_label', 'type' => 'image', 'label' => esc_html__( 'White Logo', 'alpus' ), 'tooltip' => esc_html__( 'Theme logo in AdminPanel', 'alpus' ), ), // Features / Social Login 'cs_social_login_about_title' => array( 'section' => 'sociallogin', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'About This Feature', 'alpus' ) . '

', ), 'cs_social_login_about_desc' => array( 'section' => 'sociallogin', 'type' => 'custom', 'label' => esc_html__( 'With this feature, customers could be allowed to login your site with famous social site\'s user information.', 'alpus' ), 'default' => '

' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '

', ), 'cs_social_login_title' => array( 'section' => 'sociallogin', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Social Login', 'alpus' ) . '

', ), 'social_login' => array( 'section' => 'sociallogin', 'type' => 'toggle', 'label' => esc_html__( 'Enable Social Login', 'alpus' ), 'tooltip' => esc_html__( 'Enable login by Nextend Social Login plugin.', 'alpus' ), ), // Features / Ajax Filter 'cs_archive_ajax_about_title' => array( 'section' => 'ajax_filter', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'About This Feature', 'alpus' ) . '

', ), 'cs_archive_ajax_about_desc' => array( 'section' => 'ajax_filter', 'type' => 'custom', 'label' => esc_html__( 'Make your page-speed faster than the others with modern ajax search feature.', 'alpus' ), 'default' => '

' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '

', ), 'cs_archive_ajax_title' => array( 'section' => 'ajax_filter', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Ajax Filter', 'alpus' ) . '

', ), 'archive_ajax' => array( 'type' => 'toggle', 'label' => esc_html__( 'Enable Ajax Filter', 'alpus' ), 'section' => 'ajax_filter', ), // Features / Lazyload 'cs_lazyload_about_title' => array( 'section' => 'lazyload', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'About This Feature', 'alpus' ) . '

', ), 'cs_lazyload_about_desc' => array( 'section' => 'lazyload', 'type' => 'custom', 'label' => esc_html__( 'All images will be lazyloaded when they come into screen.', 'alpus' ), 'default' => '

' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '

', ), 'cs_lazyload_title' => array( 'section' => 'lazyload', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Lazy Load', 'alpus' ) . '

', ), 'loading_animation' => array( 'section' => 'lazyload', 'type' => 'toggle', 'label' => esc_html__( 'Loading Overlay', 'alpus' ), 'tooltip' => esc_html__( 'Display overlay animation while loading.', 'alpus' ), ), 'skeleton_screen' => array( 'section' => 'lazyload', 'type' => 'toggle', 'label' => esc_html__( 'Skeleton Screen', 'alpus' ), 'tooltip' => esc_html__( 'Display the virtual area of each element on page while loading.', 'alpus' ), ), 'lazyload_menu' => array( 'section' => 'lazyload', 'type' => 'toggle', 'label' => esc_html__( 'Menu Lazyload', 'alpus' ), 'tooltip' => esc_html__( 'Menus will be saved in browsers after lazyload.', 'alpus' ), ), 'lazyload' => array( 'section' => 'lazyload', 'type' => 'toggle', 'label' => esc_html__( 'Images Lazyload', 'alpus' ), 'tooltip' => esc_html__( 'All images will be lazyloaded.', 'alpus' ), ), 'lazyload_bg' => array( 'section' => 'lazyload', 'type' => 'color', 'label' => esc_html__( 'Lazyload Image Initial Color', 'alpus' ), 'choices' => array( 'alpha' => true, ), 'active_callback' => array( array( 'setting' => 'lazyload', 'operator' => '==', 'value' => true, ), ), ), // Features / Search 'cs_search_about_title' => array( 'section' => 'search', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'About This Feature', 'alpus' ) . '

', ), 'cs_search_desc' => array( 'section' => 'search', 'type' => 'custom', 'label' => esc_html__( 'Without redirecting or entering search results page, you can get the results instantly and quickly.', 'alpus' ), 'default' => '

' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '

', ), 'cs_search_title' => array( 'section' => 'search', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Search', 'alpus' ) . '

', ), 'live_search' => array( 'section' => 'search', 'type' => 'toggle', 'label' => esc_html__( 'Live Search', 'alpus' ), 'tooltip' => esc_html__( 'Search results will be displayed instantly.', 'alpus' ), ), 'live_relevanssi' => array( 'section' => 'search', 'type' => 'toggle', 'label' => sprintf( esc_html__( 'Use %1$sRelevanssi%2$s for Live Search', 'alpus' ), '', ''), 'active_callback' => array( array( 'setting' => 'live_search', 'operator' => '!=', 'value' => '', ), ), ), 'search_post_type' => array( 'section' => 'search', 'type' => 'radio-buttonset', 'transport' => 'postMessage', 'label' => esc_html__( 'Search Post Type', 'alpus' ), 'choices' => apply_filters( 'alpha_search_content_types', class_exists( 'WooCommerce' ) ? array( '' => esc_html__( 'All', 'alpus' ), 'product' => esc_html__( 'Product', 'alpus' ), 'post' => esc_html__( 'Post', 'alpus' ), ) : array( '' => esc_html__( 'All', 'alpus' ), 'post' => esc_html__( 'Post', 'alpus' ), ) ), 'active_callback' => array( array( 'setting' => 'live_search', 'operator' => '!=', 'value' => '', ), ), ), ); if ( current_user_can( 'unfiltered_html' ) ) { $fields['custom_js'] = array( 'section' => 'custom_css_js', 'type' => 'code', 'label' => esc_html__( 'JS code', 'alpus' ), 'transport' => 'postMessage', 'choices' => array( 'language' => 'js', 'theme' => 'monokai', ), ); } if ( class_exists( 'WooCommerce' ) ) { $panels = array_merge( $panels, array( 'woocommerce' => array( 'title' => esc_html__( 'WooCommerce', 'alpus' ), 'priority' => 90, ), ) ); $sections = array_merge( $sections, array( // Woocommerce 'products_archive' => array( 'title' => esc_html__( 'Shop', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 0, ), 'product_detail' => array( 'title' => esc_html__( 'Single Product', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 0, ), 'product_type' => array( 'title' => esc_html__( 'Product Type', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 0, ), 'woo_compare' => array( 'title' => esc_html__( 'Compare', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 0, ), // Product 'product_instagram' => array( 'title' => esc_html__( 'Instagram Photos', 'alpus' ), 'panel' => 'product', 'priority' => 60, ), // WooCommerce Panel 'wc_cart' => array( 'title' => esc_html__( 'Cart Page', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 20, ), 'woocommerce_checkout' => array( 'title' => esc_html__( 'Checkout', 'alpus' ), 'panel' => 'woocommerce', 'priority' => 20, ), ) ); $fields = array_merge( $fields, array( // Woocommerce / Shop 'cs_shop_title' => array( 'section' => 'products_archive', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Shop', 'alpus' ) . '

' . esc_html__( 'Create your shop page template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Template_Shop_Builder' ) ? '' . esc_html__( 'Shop Builder', 'alpus' ) . '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), // Woocommerce / Product Type 'cs_product_type_title' => array( 'section' => 'product_type', 'type' => 'custom', 'default' => '

' . esc_html__( 'Product Type', 'alpus' ) . '

', 'priority' => 5, ), 'hover_change' => array( 'section' => 'product_type', 'type' => 'toggle', 'label' => esc_html__( 'Change Image on Hover', 'alpus' ), 'tooltip' => esc_html__( 'Enable to show second product image when mouse enters.', 'alpus' ), 'priority' => 5, ), 'prod_open_click_mob' => array( 'section' => 'product_type', 'type' => 'toggle', 'label' => esc_html__( 'Open product on second click on mobile', 'alpus' ), 'tooltip' => esc_html__( 'Enable to navigate to product detail page on second click. First click would work as hover effect on mobile.', 'alpus' ), 'priority' => 5, ), 'cs_product_quickview_title' => array( 'section' => 'product_type', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Quickview', 'alpus' ) . '

' . sprintf( esc_html__( 'You can customize quickview options in %1$sFeatures/Quickview%2$s panel.', 'alpus' ), '', '' ) . '

' . '' . esc_html__( 'Go to Quickview Options', 'alpus' ) . '', 'priority' => 20, ), // Woocommerce / Compare 'cs_woo_compare_advanced' => array( 'section' => 'woo_compare', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Compare', 'alpus' ) . '

' . sprintf( esc_html__( 'You can customize compare options in %1$sFeatures/Compare%2$s panel.', 'alpus' ), '', '' ) . '

' . '' . esc_html__( 'Go to Compare Options', 'alpus' ) . '', ), // Features / Quickview 'cs_shop_quickview_about_title' => array( 'section' => 'quickview', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'About This Feature', 'alpus' ) . '

', ), 'cs_shop_quickview_desc' => array( 'section' => 'quickview', 'type' => 'custom', 'label' => esc_html__( 'Choose your favourite one of 3 quickview types - default, offcanvas or animate.', 'alpus' ), 'default' => '

' . esc_html__( 'Theme Option Descrpition Image', 'alpus' ) . '

', ), 'cs_quickview_title' => array( 'section' => 'quickview', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Quickview', 'alpus' ) . '

', ), 'quickview_type' => array( 'section' => 'quickview', 'type' => 'radio-image', 'label' => esc_html__( 'Quickview Type', 'alpus' ), 'choices' => array( '' => ALPHA_ASSETS . '/images/options/quickview-popup.jpg', 'zoom' => ALPHA_ASSETS . '/images/options/quickview-zoom.jpg', 'offcanvas' => ALPHA_ASSETS . '/images/options/quickview-offcanvas.jpg', ), ), 'quickview_thumbs' => array( 'section' => 'quickview', 'type' => 'radio-image', 'label' => esc_html__( 'Thumbnails Position', 'alpus' ), 'choices' => array( 'vertical' => ALPHA_ASSETS . '/images/options/quickview1.png', 'horizontal' => ALPHA_ASSETS . '/images/options/quickview2.png', ), 'active_callback' => array( array( 'setting' => 'quickview_type', 'operator' => '!=', 'value' => 'offcanvas', ), ), ), // Woocommerce / Single Product 'cs_sp_title' => array( 'section' => 'product_detail', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Single Product', 'alpus' ) . '

' . esc_html__( 'Create your single product page template and show it in Layout Builder', 'alpus' ) . '

' . ( class_exists( 'Alpha_Single_Product_Builder' ) ? '' . esc_html__( 'Product Builder', 'alpus' ) . '' : '

' . sprintf( esc_html__( 'Please install %s Core Plugin', 'alpus' ), ALPHA_DISPLAY_NAME ) . '

' . '' . esc_html__( 'Install Plugins', 'alpus' ) . '' ) . '' . esc_html__( 'Layout Builder', 'alpus' ) . '', ), // Product Page / Product Data / Custom Tab 'cs_product_data' => array( 'section' => 'product_detail', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Product Data Tab', 'alpus' ) . '

', 'priority' => 10, ), 'product_description_title' => array( 'section' => 'product_detail', 'type' => 'text', 'label' => esc_html__( 'Description Title', 'alpus' ), 'transport' => 'postMessage', 'priority' => 10, ), 'product_specification_title' => array( 'section' => 'product_detail', 'type' => 'text', 'label' => esc_html__( 'Specification Title', 'alpus' ), 'placeholder' => esc_html__( 'Specification', 'alpus' ), 'transport' => 'postMessage', 'priority' => 10, ), 'product_reviews_title' => array( 'section' => 'product_detail', 'type' => 'text', 'label' => esc_html__( 'Reviews Title', 'alpus' ), 'placeholder' => esc_html__( 'Customer Reviews', 'alpus' ), 'transport' => 'postMessage', 'priority' => 10, ), // Product Page / Product Data / Custom Tab 'cs_product_custom_tab' => array( 'section' => 'product_detail', 'type' => 'custom', 'label' => '', 'default' => '

' . esc_html__( 'Custom Tab', 'alpus' ) . '

', 'priority' => 15, ), 'product_tab_title' => array( 'section' => 'product_detail', 'type' => 'text', 'label' => esc_html__( 'Custom Tab Title', 'alpus' ), 'tooltip' => esc_html__( 'Show custom tab in all product pages.', 'alpus' ), 'transport' => 'postMessage', 'priority' => 15, ), 'product_tab_block' => array( 'section' => 'product_detail', 'type' => 'select', 'label' => esc_html__( 'Custom Tab Content ( Block Builder )', 'alpus' ), 'choices' => empty( $alpha_templates['block'] ) ? array() : $custom_tab_block, 'priority' => 15, ), // WooCommerce Panel 'cart_show_qty' => array( 'section' => 'wc_cart', 'type' => 'toggle', 'label' => esc_html__( 'Quantity Input in Mini Cart', 'alpus' ), 'tooltip' => esc_html__( 'Show quantity input in mini cart list.', 'alpus' ), ), ) ); } /** * Filters the customize panels. * * @since 1.0 */ $panels = apply_filters( 'alpha_customize_panels', $panels ); foreach ( $panels as $panel => $settings ) { Kirki::add_panel( $panel, $settings ); } /** * Filters the customize sections. * * @since 1.0 */ $sections = apply_filters( 'alpha_customize_sections', $sections ); foreach ( $sections as $section => $settings ) { Kirki::add_section( $section, $settings ); } /** * Filters the customize fields. * * @since 1.0 */ $fields = apply_filters( 'alpha_customize_fields', $fields ); foreach ( $fields as $field => $settings ) { if ( ! isset( $settings['default'] ) ) { $settings['default'] = alpha_get_option( $field ); } $settings['settings'] = $field; Kirki::add_field( 'option', $settings ); } } public function selective_refresh( $customize ) { $customize->selective_refresh->add_partial( 'selective-gdpr', array( 'selector' => '.cookies-popup', 'settings' => array( 'cookie_text', 'cookie_agree_btn' ), 'container_inclusive' => true, 'render_callback' => function() { if ( class_exists( 'Alpha_GDPR' ) ) { Alpha_GDPR::get_instance()->print_cookie_popup( true ); } }, ) ); // @start feature: fs_plugin_woocommerce if ( class_exists( 'WooCommerce' ) ) { $customize->selective_refresh->add_partial( 'selective-breadcrumb', array( 'selector' => '.breadcrumb-container', 'settings' => array( 'ptb_delimiter' ), 'container_inclusive' => true, 'render_callback' => function() { alpha_breadcrumb(); }, ) ); } // @end feature: fs_plugin_woocommerce } // @start feature: fs_plugin_woocommerce /** * Change placeholder image for product * * @since 1.0 */ public function update_woocommerce_placeholder_image( $value, $old_value ) { update_option( 'woocommerce_placeholder_image', $value ); return $value; } // @end feature: fs_plugin_woocommerce } endif; if ( class_exists( 'Kirki' ) ) { Alpha_Customizer::get_instance(); }