$this->section_test, 'title' => __( 'Test Controls', 'bigshop' ), 'description' => __( 'Customize the Test', 'bigshop' ), 'priority' => 9999 ] ); Customize::add_controls( $this->section_test, $this->get_controls() ); } /** * Get controls * @return array */ public function get_controls() { return apply_filters( 'rt_test_test_controls', [ //Reset button 'rt_reset_customize' => [ 'type' => 'heading', 'reset' => '1', ], //Reset button 'rt_test_heading1' => [ 'type' => 'heading', 'label' => __( 'All controls', 'bigshop' ), 'description' => __( 'All controls are here', 'bigshop' ), ], 'rt_test_switch' => [ 'type' => 'switch', 'label' => __( 'Choose switch', 'bigshop' ), ], 'rt_test_text' => [ 'type' => 'text', 'label' => __( 'Text Default', 'bigshop' ), 'default' => __( 'Text Default', 'bigshop' ), 'transport' => '', 'condition' => [ 'rt_test_switch' ] ], 'rt_test_switch2' => [ 'type' => 'switch', 'label' => __( 'Choose switch2', 'bigshop' ), ], 'rt_test_url' => [ 'type' => 'url', 'label' => __( 'url', 'bigshop' ), 'default' => __( 'url Default', 'bigshop' ), 'transport' => '', 'condition' => [ 'rt_test_switch2', '!==', 1 ] ], 'rt_test_select' => [ 'type' => 'select', 'label' => __( 'Select a Val', 'bigshop' ), 'description' => __( 'Select Discription', 'bigshop' ), 'default' => 'menu-left', 'choices' => [ 'menu-left' => __( 'Left Alignment', 'bigshop' ), 'menu-center' => __( 'Center Alignment', 'bigshop' ), 'menu-right' => __( 'Right Alignment', 'bigshop' ), ] ], 'rt_test_textarea' => [ 'type' => 'textarea', 'label' => __( 'Textarea', 'bigshop' ), 'default' => __( 'Textarea Default', 'bigshop' ), 'transport' => '', ], 'rt_test_select5' => [ 'type' => 'select', 'label' => __( 'Select a Val2', 'bigshop' ), 'description' => __( 'Select Discription', 'bigshop' ), 'default' => 'menu-center', 'choices' => [ 'menu-left' => __( 'Left Alignment', 'bigshop' ), 'menu-center' => __( 'Center Alignment', 'bigshop' ), 'menu-right' => __( 'Right Alignment', 'bigshop' ), ] ], 'rt_test_textarea2' => [ 'type' => 'textarea', 'label' => __( 'Textarea2', 'bigshop' ), 'default' => __( 'Textarea Default', 'bigshop' ), 'transport' => '', ], 'rt_test_checkbox' => [ 'type' => 'checkbox', 'label' => __( 'Choose checkbox', 'bigshop' ), ], 'rt_test_textarea22' => [ 'type' => 'textarea', 'label' => __( 'Checkbox Textarea2', 'bigshop' ), 'transport' => '', 'condition' => [ 'rt_test_checkbox', '==', '1' ] ], 'rt_test_radio' => [ 'type' => 'radio', 'label' => __( 'Choose radio', 'bigshop' ), 'choices' => [ 'menu-left' => __( 'Left Alignment', 'bigshop' ), 'menu-center' => __( 'Center Alignment', 'bigshop' ), 'menu-right' => __( 'Right Alignment', 'bigshop' ), ] ], 'rt_test_textarea222' => [ 'type' => 'textarea', 'label' => __( 'rt_test_radio Textarea2 - menu-center', 'bigshop' ), 'transport' => '', ], 'rt_test_image_choose' => [ 'type' => 'image_select', 'label' => __( 'Choose Layout', 'bigshop' ), 'default' => '1', 'choices' => $this->get_header_presets() ], 'rt_test_image' => [ 'type' => 'image', 'label' => __( 'Choose Image', 'bigshop' ), 'button_label' => __( 'Logo', 'bigshop' ), ], 'rt_test_image_attr' => [ 'type' => 'bg_attribute', 'condition' => [ 'rt_banner' ], 'default' => json_encode( [ 'position' => 'center center', 'attachment' => 'scroll', 'repeat' => 'no-repeat', 'size' => 'auto', ] ) ], 'rt_test_number' => [ 'type' => 'number', 'label' => __( 'Select a Number', 'bigshop' ), 'description' => __( 'Select Number', 'bigshop' ), 'default' => '5', ], 'rt_test_pages' => [ 'type' => 'pages', 'label' => __( 'Choose page', 'bigshop' ), ], 'rt_test_color' => [ 'type' => 'color', 'label' => __( 'Choose color', 'bigshop' ), ], 'rt_test_alfa_color' => [ 'type' => 'alfa_color', 'label' => __( 'Choose alfa_color', 'bigshop' ), ], 'rt_test_datetime' => [ 'type' => 'datetime', 'label' => __( 'Choose datetime', 'bigshop' ), ], 'rt_test_select2' => [ 'type' => 'select2', 'label' => __( 'Choose Meta', 'bigshop' ), 'placeholder' => __( 'Choose Meta', 'bigshop' ), 'multiselect' => true, 'choices' => [ 'author' => __( 'Author', 'bigshop' ), 'date' => __( 'Date', 'bigshop' ), 'category' => __( 'Category', 'bigshop' ), 'tag' => __( 'Tag', 'bigshop' ), 'comment' => __( 'Comment', 'bigshop' ), ], ], 'rt_test_repeater' => [ 'type' => 'repeater', 'label' => __( 'Choose repeater', 'bigshop' ), ], 'rt_test_blog_meta_order1' => [ 'type' => 'repeater', 'label' => __( 'Meta Order', 'bigshop' ), 'default' => 'one, two, three, four', 'use_as' => 'sort', //'sort','repeater' ], 'rt_test_blog_meta_order2' => [ 'type' => 'repeater', 'label' => __( 'Meta Order', 'bigshop' ), 'default' => 'one, two, three, four', // 'use_as' => 'repeater', //'sort','repeater' ], 'rt_test_typography2' => [ 'type' => 'typography', 'label' => __( 'Typography', 'bigshop' ), 'default' => json_encode( [ 'font' => 'Open Sans', 'regularweight' => 'normal', 'size' => '16', 'lineheight' => '26', ] ) ], 'rt_test_typography3' => [ 'type' => 'typography', 'label' => __( 'Typography', 'bigshop' ), 'default' => json_encode( [ 'font' => 'Open Sans', 'regularweight' => 'normal', 'size' => '16', 'lineheight' => '26', ] ) ], ] ); } /** * Get Header Presets * @return array[] */ public function get_header_presets() { if ( ! defined( 'RT_FRAMEWORK_DIR_URL' ) ) { return []; } return [ '1' => [ 'image' => RT_FRAMEWORK_DIR_URL . '/assets/images/header-1.png', 'name' => __( 'Style 1', 'bigshop' ), ], '2' => [ 'image' => RT_FRAMEWORK_DIR_URL . '/assets/images/header-1.png', 'name' => __( 'Style 2', 'bigshop' ), ], '3' => [ 'image' => RT_FRAMEWORK_DIR_URL . '/assets/images/header-1.png', 'name' => __( 'Style 3', 'bigshop' ), ], ]; } }