← All changes
|
config/elementor/instructor/sections/description.php
+88
-88
4.3.9
→
4.4.8
View file →
| @@ -1,88 +1,88 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Elementor Controls for widget Become a teacher settings. | |
| 4 | - * | |
| 5 | - * @since 4.2.3 | |
| 6 | - * @version 1.0.0 | |
| 7 | - */ | |
| 8 | - | |
| 9 | -use Elementor\Controls_Manager; | |
| 10 | -use LearnPress\ExternalPlugin\Elementor\LPElementorControls; | |
| 11 | - | |
| 12 | -// Fields tab content | |
| 13 | -$content_fields = array_merge( | |
| 14 | - LPElementorControls::add_fields_in_section( | |
| 15 | - 'wrapper', | |
| 16 | - esc_html__( 'Wrapper', 'learnpress' ), | |
| 17 | - Controls_Manager::TAB_CONTENT, | |
| 18 | - [ | |
| 19 | - LPElementorControls::add_control_type( | |
| 20 | - 'instructor_id', | |
| 21 | - esc_html__( 'Set Instructor ID', 'learnpress' ), | |
| 22 | - '', | |
| 23 | - Controls_Manager::TEXT, | |
| 24 | - [ | |
| 25 | - 'description' => 'If widget include on page is Single Instructor, will be get instructor id automatic, from query var.', | |
| 26 | - ] | |
| 27 | - ), | |
| 28 | - LPElementorControls::add_control_type( | |
| 29 | - 'wrapper_tags', | |
| 30 | - esc_html__( 'Add html tag wrapper Instructor Description', 'learnpress' ), | |
| 31 | - [ | |
| 32 | - [ | |
| 33 | - 'open_tag' => '<div class="div">', | |
| 34 | - 'close_tag' => '</div>', | |
| 35 | - ], | |
| 36 | - ], | |
| 37 | - Controls_Manager::REPEATER, | |
| 38 | - [ | |
| 39 | - 'fields' => [ | |
| 40 | - [ | |
| 41 | - 'name' => 'open_tag', | |
| 42 | - 'label' => esc_html__( 'Html Open tag', 'learnpress' ), | |
| 43 | - 'type' => Controls_Manager::TEXT, | |
| 44 | - 'label_block' => true, | |
| 45 | - ], | |
| 46 | - [ | |
| 47 | - 'name' => 'close_tag', | |
| 48 | - 'label' => esc_html__( 'Html Close tag', 'learnpress' ), | |
| 49 | - 'type' => Controls_Manager::TEXT, | |
| 50 | - 'label_block' => true, | |
| 51 | - ], | |
| 52 | - | |
| 53 | - ], | |
| 54 | - 'prevent_empty' => false, | |
| 55 | - ] | |
| 56 | - ), | |
| 57 | - ] | |
| 58 | - ), | |
| 59 | - [] | |
| 60 | -); | |
| 61 | - | |
| 62 | -// Fields tab style | |
| 63 | -$style_fields = array_merge( | |
| 64 | - LPElementorControls::add_fields_in_section( | |
| 65 | - 'description', | |
| 66 | - esc_html__( 'Instructor Description', 'learnpress' ), | |
| 67 | - Controls_Manager::TAB_STYLE, | |
| 68 | - LPElementorControls::add_controls_style_text( | |
| 69 | - 'description', | |
| 70 | - '.instructor-description' | |
| 71 | - ) | |
| 72 | - ), | |
| 73 | - [] | |
| 74 | -); | |
| 75 | - | |
| 76 | -return apply_filters( | |
| 77 | - 'learn-press/elementor/instructor/description', | |
| 78 | - array_merge( | |
| 79 | - apply_filters( | |
| 80 | - 'learn-press/elementor/instructor/description/tab-content', | |
| 81 | - $content_fields | |
| 82 | - ), | |
| 83 | - apply_filters( | |
| 84 | - 'learn-press/elementor/instructor/description/tab-styles', | |
| 85 | - $style_fields | |
| 86 | - ) | |
| 87 | - ) | |
| 88 | -); | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Elementor Controls for widget Become a teacher settings. | |
| 4 | + * | |
| 5 | + * @since 4.2.3 | |
| 6 | + * @version 1.0.0 | |
| 7 | + */ | |
| 8 | + | |
| 9 | +use Elementor\Controls_Manager; | |
| 10 | +use LearnPress\ExternalPlugin\Elementor\LPElementorControls; | |
| 11 | + | |
| 12 | +// Fields tab content | |
| 13 | +$content_fields = array_merge( | |
| 14 | + LPElementorControls::add_fields_in_section( | |
| 15 | + 'wrapper', | |
| 16 | + esc_html__( 'Wrapper', 'learnpress' ), | |
| 17 | + Controls_Manager::TAB_CONTENT, | |
| 18 | + [ | |
| 19 | + LPElementorControls::add_control_type( | |
| 20 | + 'instructor_id', | |
| 21 | + esc_html__( 'Set Instructor ID', 'learnpress' ), | |
| 22 | + '', | |
| 23 | + Controls_Manager::TEXT, | |
| 24 | + [ | |
| 25 | + 'description' => 'If widget include on page is Single Instructor, will be get instructor id automatic, from query var.', | |
| 26 | + ] | |
| 27 | + ), | |
| 28 | + LPElementorControls::add_control_type( | |
| 29 | + 'wrapper_tags', | |
| 30 | + esc_html__( 'Add html tag wrapper Instructor Description', 'learnpress' ), | |
| 31 | + [ | |
| 32 | + [ | |
| 33 | + 'open_tag' => '<div class="div">', | |
| 34 | + 'close_tag' => '</div>', | |
| 35 | + ], | |
| 36 | + ], | |
| 37 | + Controls_Manager::REPEATER, | |
| 38 | + [ | |
| 39 | + 'fields' => [ | |
| 40 | + [ | |
| 41 | + 'name' => 'open_tag', | |
| 42 | + 'label' => esc_html__( 'Html Open tag', 'learnpress' ), | |
| 43 | + 'type' => Controls_Manager::TEXT, | |
| 44 | + 'label_block' => true, | |
| 45 | + ], | |
| 46 | + [ | |
| 47 | + 'name' => 'close_tag', | |
| 48 | + 'label' => esc_html__( 'Html Close tag', 'learnpress' ), | |
| 49 | + 'type' => Controls_Manager::TEXT, | |
| 50 | + 'label_block' => true, | |
| 51 | + ], | |
| 52 | + | |
| 53 | + ], | |
| 54 | + 'prevent_empty' => false, | |
| 55 | + ] | |
| 56 | + ), | |
| 57 | + ] | |
| 58 | + ), | |
| 59 | + [] | |
| 60 | +); | |
| 61 | + | |
| 62 | +// Fields tab style | |
| 63 | +$style_fields = array_merge( | |
| 64 | + LPElementorControls::add_fields_in_section( | |
| 65 | + 'description', | |
| 66 | + esc_html__( 'Instructor Description', 'learnpress' ), | |
| 67 | + Controls_Manager::TAB_STYLE, | |
| 68 | + LPElementorControls::add_controls_style_text( | |
| 69 | + 'description', | |
| 70 | + '.instructor-description' | |
| 71 | + ) | |
| 72 | + ), | |
| 73 | + [] | |
| 74 | +); | |
| 75 | + | |
| 76 | +return apply_filters( | |
| 77 | + 'learn-press/elementor/instructor/description', | |
| 78 | + array_merge( | |
| 79 | + apply_filters( | |
| 80 | + 'learn-press/elementor/instructor/description/tab-content', | |
| 81 | + $content_fields | |
| 82 | + ), | |
| 83 | + apply_filters( | |
| 84 | + 'learn-press/elementor/instructor/description/tab-styles', | |
| 85 | + $style_fields | |
| 86 | + ) | |
| 87 | + ) | |
| 88 | +); | |