Advertisement
Asaduzzaman7

Untitled

Dec 6th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.80 KB | None | 0 0
  1. //////////////////////////////////////
  2. /// Style Normal & Hover Option Making
  3. //////////////////////////////////////
  4. $this->start_controls_section(
  5.             'style_section',
  6.             [
  7.                 'label' =>  __('Style', 'textdomain'),
  8.                 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
  9.             ]
  10.         );
  11.         $this->start_controls_tabs(
  12.             'style_tabs'
  13.         );
  14.  
  15.         $this->start_controls_tab(
  16.             'normal_color',
  17.             [
  18.                 'label' => __( 'Normal', 'textdomain' ),
  19.             ]
  20.         );
  21.         $this->add_control(
  22.             'tab_color',
  23.             [
  24.                 'label' =>  __('Color','textdomain'),
  25.                 'type'     => \Elementor\Controls_Manager::COLOR,
  26.                 'scheme' => [
  27.                     'type' => \Elementor\Scheme_Color::get_type(),
  28.                     'value' => \Elementor\Scheme_Color::COLOR_1,
  29.                 ],
  30.                 'default' => '#FF3A46',
  31.                 'selectors' => [
  32.                     '{{WRAPPER}} ' => 'color: {{VALUE}}',
  33.                 ],
  34.             ]
  35.         );
  36.         $this->end_controls_tab();
  37.  
  38.         $this->start_controls_tab(
  39.             'hover_color',
  40.             [
  41.                 'label' => __( 'Hover', 'textdomain' ),
  42.             ]
  43.         );
  44.         $this->add_control(
  45.             'filter_tab_active_color',
  46.             [
  47.                 'label' =>  __('HoverColor','textdomain'),
  48.                 'type'     => \Elementor\Controls_Manager::COLOR,
  49.                 'scheme' => [
  50.                     'type' => \Elementor\Scheme_Color::get_type(),
  51.                     'value' => \Elementor\Scheme_Color::COLOR_1,
  52.                 ],
  53.                 'default' => '#fff',
  54.                 'selectors' => [
  55.                     '{{WRAPPER}}' => 'color: {{VALUE}}',
  56.                 ],
  57.             ]
  58.         );
  59. $this->end_controls_tab();
  60. $this->end_controls_tab();
  61. $this->end_controls_section();
  62.  
  63.  
  64. ///////////////////////////
  65. //// Elementor TEXT Control
  66. ///////////////////////////
  67. $this->add_control(
  68.             'widget_title',
  69.             [
  70.                 'label' => __( 'Title', 'textdomain' ),
  71.                 'type' => \Elementor\Controls_Manager::TEXT,
  72.                 'default' => __( 'Default title', 'textdomain' ),
  73.                 'placeholder' => __( 'Type your title here', 'textdomain' ),
  74.             ]
  75.         );
  76. ///////////////////////////
  77. //// Elementor NUMBER Control
  78. ///////////////////////////
  79. $this->add_control(
  80.             'price',
  81.             [
  82.                 'label' => __( 'Price', 'textdomain' ),
  83.                 'type' => \Elementor\Controls_Manager::NUMBER,
  84.                 'min' => 5,
  85.                 'max' => 100,
  86.                 'step' => 5,
  87.                 'default' => 10,
  88.             ]
  89.         );
  90. ///////////////////////////
  91. //// Elementor TEXTAREA Control
  92. ///////////////////////////
  93. $this->add_control(
  94.             'item_description',
  95.             [
  96.                 'label' => __( 'Description', 'textdomain' ),
  97.                 'type' => \Elementor\Controls_Manager::TEXTAREA,
  98.                 'rows' => 10,
  99.                 'default' => __( 'Default description', 'textdomain' ),
  100.                 'placeholder' => __( 'Type your description here', 'textdomain' ),
  101.             ]
  102.         );
  103. ///////////////////////////
  104. //// Elementor WYSIWYG Control
  105. ///////////////////////////
  106. $this->add_control(
  107.             'item_description',
  108.             [
  109.                 'label' => __( 'Description', 'textdomain' ),
  110.                 'type' => \Elementor\Controls_Manager::WYSIWYG,
  111.                 'default' => __( 'Default description', 'textdomain' ),
  112.                 'placeholder' => __( 'Type your description here', 'textdomain' ),
  113.             ]
  114.         );
  115. ///////////////////////////
  116. //// Elementor Switcher  Control
  117. ///////////////////////////
  118. $this->add_control(
  119.             'show_title',
  120.             [
  121.                 'label' => __( 'Show Title', 'textdomain' ),
  122.                 'type' => \Elementor\Controls_Manager::SWITCHER,
  123.                 'label_on' => __( 'Show', 'textdomain' ),
  124.                 'label_off' => __( 'Hide', 'textdomain' ),
  125.                 'return_value' => 'yes',
  126.                 'default' => 'yes',
  127.             ]
  128.         );
  129.  
  130. ///////////////////////////
  131. //// Elementor SELECT2 Control
  132. ///////////////////////////
  133. $this->add_control(
  134.             'show_elements',
  135.             [
  136.                 'label' => __( 'Show Elements', 'textdomain' ),
  137.                 'type' => \Elementor\Controls_Manager::SELECT2,
  138.                 'multiple' => true,
  139.                 'options' => [
  140.                     'title'  => __( 'Title', 'textdomain' ),
  141.                     'description' => __( 'Description', 'textdomain' ),
  142.                     'button' => __( 'Button', 'textdomain' ),
  143.                 ],
  144.                 'default' => [ 'title', 'description' ],
  145.             ]
  146.         );
  147. ///////////////////////////
  148. //// Elementor Choose  Control
  149. ///////////////////////////
  150. $this->add_control(
  151.             'text_align',
  152.             [
  153.                 'label' => __( 'Alignment', 'textdomain' ),
  154.                 'type' => \Elementor\Controls_Manager::CHOOSE,
  155.                 'options' => [
  156.                     'left' => [
  157.                         'title' => __( 'Left', 'textdomain' ),
  158.                         'icon' => 'fa fa-align-left',
  159.                     ],
  160.                     'center' => [
  161.                         'title' => __( 'Center', 'textdomain' ),
  162.                         'icon' => 'fa fa-align-center',
  163.                     ],
  164.                     'right' => [
  165.                         'title' => __( 'Right', 'textdomain' ),
  166.                         'icon' => 'fa fa-align-right',
  167.                     ],
  168.                 ],
  169.                 'default' => 'center',
  170.                 'toggle' => true,
  171.             ]
  172.         );
  173. ///////////////////////////
  174. //// Elementor COLOR Control
  175. ///////////////////////////
  176. $this->add_control(
  177.             'title_color',
  178.             [
  179.                 'label' => __( 'Title Color', 'textdomain' ),
  180.                 'type' => \Elementor\Controls_Manager::COLOR,
  181.                 'scheme' => [
  182.                     'type' => \Elementor\Scheme_Color::get_type(),
  183.                     'value' => \Elementor\Scheme_Color::COLOR_1,
  184.                 ],
  185.                 'selectors' => [
  186.                     '{{WRAPPER}} .title' => 'color: {{VALUE}}',
  187.                 ],
  188.             ]
  189.         );
  190. ///////////////////////////
  191. //// Elementor Typography Control
  192. ///////////////////////////
  193. $this->add_group_control(
  194.             \Elementor\Group_Control_Typography::get_type(),
  195.             [
  196.                 'name' => 'author_typography',
  197.                 'label' => __( 'Typography', 'textdomain' ),
  198.                 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
  199.                 'selector' => '{{WRAPPER}} .text',
  200.             ]
  201.         );
  202. ///////////////////////////
  203. //// Elementor TEXT Control
  204. ///////////////////////////
  205.  
  206. ///////////////////////////
  207. //// Elementor TEXT Control
  208. ///////////////////////////
  209.  
  210. ///////////////////////////
  211. //// Elementor TEXT Control
  212. ///////////////////////////
  213.  
  214. ///////////////////////////
  215. //// Elementor TEXT Control
  216. ///////////////////////////
  217.  
  218. ///////////////////////////
  219. //// Elementor TEXT Control
  220. ///////////////////////////
  221.  
  222. ///////////////////////////
  223. //// Elementor TEXT Control
  224. ///////////////////////////
  225.  
  226. ///////////////////////////
  227. //// Elementor TEXT Control
  228. ///////////////////////////
  229.  
  230. ///////////////////////////
  231. //// Elementor TEXT Control
  232. ///////////////////////////
  233.  
  234. ///////////////////////////
  235. //// Elementor TEXT Control
  236. ///////////////////////////
  237.  
  238. ///////////////////////////
  239. //// Elementor TEXT Control
  240. ///////////////////////////
  241.  
  242. ///////////////////////////
  243. //// Elementor TEXT Control
  244. ///////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement