tabs.php
50 lines
| 1 | <?php |
| 2 | if( class_exists('WPML_Elementor_Module_With_Items') ) { |
| 3 | /** |
| 4 | * Class WPML_Elementor_Icon_List |
| 5 | */ |
| 6 | class Auxin_WPML_Elementor_Tabs extends WPML_Elementor_Module_With_Items { |
| 7 | /** |
| 8 | * @return string |
| 9 | */ |
| 10 | public function get_items_field() { |
| 11 | return 'tab_items'; |
| 12 | } |
| 13 | /** |
| 14 | * @return array |
| 15 | */ |
| 16 | public function get_fields() { |
| 17 | return array( 'tab_label', 'content' ); |
| 18 | } |
| 19 | /** |
| 20 | * @param string $field |
| 21 | * |
| 22 | * @return string |
| 23 | */ |
| 24 | protected function get_title( $field ) { |
| 25 | switch( $field ) { |
| 26 | case 'tab_label': |
| 27 | return esc_html__( 'Tab: Label', 'auxin-elements' ); |
| 28 | case 'content': |
| 29 | return esc_html__( 'Tab: Content', 'auxin-elements' ); |
| 30 | default: |
| 31 | return ''; |
| 32 | } |
| 33 | } |
| 34 | /** |
| 35 | * @param string $field |
| 36 | * |
| 37 | * @return string |
| 38 | */ |
| 39 | protected function get_editor_type( $field ) { |
| 40 | switch( $field ) { |
| 41 | case 'tab_label': |
| 42 | return 'LINE'; |
| 43 | case 'content': |
| 44 | return 'VISUAL'; |
| 45 | default: |
| 46 | return ''; |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | } |