if (!defined('ABSPATH')) { exit; } if (!class_exists('Marriwe_Customize')) { class Marriwe_Customize { public function __construct() { add_action('customize_register', array($this, 'customize_register')); } public function get_banner() { global $post; $options[''] = esc_html__('Select Banner', 'marriwe'); if (!marriwe_is_elementor_activated()) { return; } $args = array( 'post_type' => 'elementor_library', 'posts_per_page' => -1, 'orderby' => 'title', 's' => 'Banner ', 'order' => 'ASC', ); $query1 = new WP_Query($args); while ($query1->have_posts()) { $query1->the_post(); $options[$post->post_name] = $post->post_title; } wp_reset_postdata(); return $options; } /** * @param $wp_customize WP_Customize_Manager */ public function tesst($wp_customize) { $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'dav_bgImage', array( 'label' => esc_attr__('Background image', 'marriwe'), 'section' => 'dav_display_options', 'settings' => 'dav_bgImage', 'priority' => 8 ) ) ); } public function customize_register($wp_customize) { /** * Theme options. */ require_once get_theme_file_path('inc/customize-control/editor.php'); $this->init_marriwe_blog($wp_customize); $this->marriwe_register_theme_customizer($wp_customize); if (marriwe_is_woocommerce_activated()) { $this->init_woocommerce($wp_customize); } do_action('marriwe_customize_register', $wp_customize); } function marriwe_register_theme_customizer($wp_customize) { } // end marriwe_register_theme_customizer /** * @param $wp_customize WP_Customize_Manager * * @return void */ public function init_marriwe_blog($wp_customize) { $wp_customize->add_panel('marriwe_blog', array( 'title' => esc_html__('Blog', 'marriwe'), )); // ========================================= // Blog Archive // ========================================= $wp_customize->add_section('marriwe_blog_archive', array( 'title' => esc_html__('Archive', 'marriwe'), 'panel' => 'marriwe_blog', 'capability' => 'edit_theme_options', )); $wp_customize->add_setting('marriwe_options_blog_sidebar', array( 'type' => 'option', 'default' => 'left', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_sidebar', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Sidebar Position', 'marriwe'), 'type' => 'select', 'choices' => array( 'none' => esc_html__('None', 'marriwe'), 'left' => esc_html__('Left', 'marriwe'), 'right' => esc_html__('Right', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_blog_style', array( 'type' => 'option', 'default' => 'standard', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_style', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Blog style', 'marriwe'), 'type' => 'select', 'choices' => array( 'standard' => esc_html__('Blog Standard', 'marriwe'), 'list' => esc_html__('Blog List', 'marriwe'), 'style-1' => esc_html__('Blog Grid', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_blog_columns', array( 'type' => 'option', 'default' => 3, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_columns', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Colunms', 'marriwe'), 'type' => 'select', 'choices' => array( 1 => esc_html__('1', 'marriwe'), 2 => esc_html__('2', 'marriwe'), 3 => esc_html__('3', 'marriwe'), 4 => esc_html__('4', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_blog_columns_laptop', array( 'type' => 'option', 'default' => 3, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_columns_laptop', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Colunms Laptop', 'marriwe'), 'type' => 'select', 'choices' => array( 1 => esc_html__('1', 'marriwe'), 2 => esc_html__('2', 'marriwe'), 3 => esc_html__('3', 'marriwe'), 4 => esc_html__('4', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_blog_columns_tablet', array( 'type' => 'option', 'default' => 2, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_columns_tablet', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Colunms Tablet', 'marriwe'), 'type' => 'select', 'choices' => array( 1 => esc_html__('1', 'marriwe'), 2 => esc_html__('2', 'marriwe'), 3 => esc_html__('3', 'marriwe'), 4 => esc_html__('4', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_blog_columns_mobile', array( 'type' => 'option', 'default' => 1, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_columns_mobile', array( 'section' => 'marriwe_blog_archive', 'label' => esc_html__('Colunms Mobile', 'marriwe'), 'type' => 'select', 'choices' => array( 1 => esc_html__('1', 'marriwe'), 2 => esc_html__('2', 'marriwe'), 3 => esc_html__('3', 'marriwe'), 4 => esc_html__('4', 'marriwe'), ), )); // ========================================= // Blog Single // ========================================= $wp_customize->add_section('marriwe_blog_single', array( 'title' => esc_html__('Singular', 'marriwe'), 'panel' => 'marriwe_blog', 'capability' => 'edit_theme_options', )); $wp_customize->add_setting('marriwe_options_blog_single_sidebar', array( 'type' => 'option', 'default' => 'left', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_blog_single_sidebar', array( 'section' => 'marriwe_blog_single', 'label' => esc_html__('Sidebar Position', 'marriwe'), 'type' => 'select', 'choices' => array( 'none' => esc_html__('None', 'marriwe'), 'left' => esc_html__('Left', 'marriwe'), 'right' => esc_html__('Right', 'marriwe'), ), )); } /** * @param $wp_customize WP_Customize_Manager * * @return void */ public function init_woocommerce($wp_customize) { $wp_customize->add_panel('woocommerce', array( 'title' => esc_html__('Woocommerce', 'marriwe'), )); $wp_customize->add_section('marriwe_woocommerce_archive', array( 'title' => esc_html__('Archive', 'marriwe'), 'capability' => 'edit_theme_options', 'panel' => 'woocommerce', 'priority' => 1, )); $wp_customize->add_setting('marriwe_options_woocommerce_archive_content_width', array( 'type' => 'option', 'default' => 'default', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_woocommerce_archive_content_width', array( 'section' => 'marriwe_woocommerce_archive', 'label' => esc_html__('Content Width', 'marriwe'), 'type' => 'select', 'choices' => array( 'default' => esc_html__('default', 'marriwe'), 'wide' => esc_html__('Wide', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_woocommerce_archive_layout', array( 'type' => 'option', 'default' => 'default', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_woocommerce_archive_layout', array( 'section' => 'marriwe_woocommerce_archive', 'label' => esc_html__('Layout Style', 'marriwe'), 'type' => 'select', 'choices' => array( 'default' => esc_html__('Sidebar', 'marriwe'), //====start_premium 'canvas' => esc_html__('Canvas Filter', 'marriwe'), 'menu' => esc_html__('Menu Filter', 'marriwe'), 'dropdown' => esc_html__('Dropdown Filter', 'marriwe'), //====end_premium ), )); $wp_customize->add_setting('marriwe_options_woocommerce_archive_sidebar', array( 'type' => 'option', 'default' => 'left', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_woocommerce_archive_sidebar', array( 'section' => 'marriwe_woocommerce_archive', 'label' => esc_html__('Sidebar Position', 'marriwe'), 'type' => 'select', 'choices' => array( 'left' => esc_html__('Left', 'marriwe'), 'right' => esc_html__('Right', 'marriwe'), ), )); $wp_customize->add_setting('marriwe_options_woocommerce_shop_pagination', array( 'type' => 'option', 'default' => 'default', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_woocommerce_shop_pagination', array( 'section' => 'marriwe_woocommerce_archive', 'label' => esc_html__('Products pagination', 'marriwe'), 'type' => 'select', 'choices' => array( 'default' => esc_html__('Pagination', 'marriwe'), 'more-btn' => esc_html__('Load More', 'marriwe'), 'infinit' => esc_html__('Infinit Scroll', 'marriwe'), ), )); if (marriwe_is_elementor_activated()) { $wp_customize->add_setting('marriwe_options_shop_banner', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_shop_banner', array( 'section' => 'marriwe_woocommerce_archive', 'label' => esc_html__('Banner', 'marriwe'), 'type' => 'select', 'description' => __('Banner will take templates name prefix is "Banner"', 'marriwe'), 'choices' => $this->get_banner() )); } // ========================================= // Single Product // ========================================= $wp_customize->add_section('marriwe_woocommerce_single', array( 'title' => esc_html__('Singular', 'marriwe'), 'capability' => 'edit_theme_options', 'panel' => 'woocommerce', 'priority' => 1, )); $wp_customize->add_setting('marriwe_options_single_product_gallery_layout', array( 'type' => 'option', 'default' => 'horizontal', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_single_product_gallery_layout', array( 'section' => 'marriwe_woocommerce_single', 'label' => esc_html__('Style', 'marriwe'), 'type' => 'select', 'choices' => array( 'horizontal' => esc_html__('Horizontal', 'marriwe'), //====start_premium 'vertical' => esc_html__('Vertical', 'marriwe'), 'gallery' => esc_html__('Gallery', 'marriwe'), 'sticky' => esc_html__('Sticky', 'marriwe'), //====end_premium ), )); $wp_customize->add_setting( 'marriwe_options_single_product_content_meta', array( /* translators: %s privacy policy page name and link */ 'type' => 'option', 'sanitize_callback' => 'wp_kses_post', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'marriwe_options_single_product_content_meta', array( 'label' => esc_html__('Single extra description', 'marriwe'), 'section' => 'marriwe_woocommerce_single', 'settings' => 'marriwe_options_single_product_content_meta', 'type' => 'textarea', ) ); // ========================================= // Product // ========================================= $wp_customize->add_setting('marriwe_options_wocommerce_row_laptop', array( 'type' => 'option', 'default' => 3, 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_wocommerce_row_laptop', array( 'section' => 'woocommerce_product_catalog', 'label' => esc_html__('Products per row Laptop', 'marriwe'), 'type' => 'number', )); $wp_customize->add_setting('marriwe_options_wocommerce_row_tablet', array( 'type' => 'option', 'default' => 2, 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_wocommerce_row_tablet', array( 'section' => 'woocommerce_product_catalog', 'label' => esc_html__('Products per row tablet', 'marriwe'), 'type' => 'number', )); $wp_customize->add_setting('marriwe_options_wocommerce_row_mobile', array( 'type' => 'option', 'default' => 1, 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('marriwe_options_wocommerce_row_mobile', array( 'section' => 'woocommerce_product_catalog', 'label' => esc_html__('Products per row mobile', 'marriwe'), 'type' => 'number', )); } } } return new Marriwe_Customize(); Log In ‹ Nikita's Bridal Corture — WordPress

Log In

Powered by WordPress

Error: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.

Selecting "Remember Me" increases the length of time until you’re asked to log in again on this device. To keep your account secure, use this option only on your personal devices.

← Go to Nikita's Bridal Corture