PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.17.14
Shortcodes and extra features for Phlox theme v2.17.14
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / modules / section.php
auxin-elements / includes / elementor / modules Last commit date
documents 4 years ago dynamic-tags 1 year ago query-control 2 years ago settings 1 year ago theme-builder 1 year ago column.php 1 year ago common.php 6 months ago container.php 1 year ago section.php 1 year ago templates-types-manager.php 3 years ago
section.php
191 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Modules;
3
4 use Elementor\Controls_Manager;
5 use Elementor\Group_Control_Background;
6
7
8 class Section {
9
10 /**
11 * Instance of this class.
12 *
13 * @var object
14 */
15 protected static $instance = null;
16
17
18 public function __construct(){
19 // Modify section render
20 // add_action( 'elementor/frontend/section/before_render', array( $this, 'modify_render' ) );
21
22 // Add new controls
23 add_action( 'elementor/element/after_section_end', array( $this, 'add_pseudo_background_controls' ), 20, 3 );
24
25 // Go pro notice for inner container options
26 add_action( 'elementor/element/section/section_typo/after_section_end' , array( $this, 'add_inner_container_notice' ), 90 );
27 }
28
29 /**
30 * Return an instance of this class.
31 *
32 * @return object A single instance of this class.
33 */
34 public static function get_instance() {
35 // If the single instance hasn't been set, set it now.
36 if ( null == self::$instance ) {
37 self::$instance = new self;
38 }
39
40 return self::$instance;
41 }
42
43
44 /**
45 * Modify the render of section element
46 *
47 * @param Element_Section $section Instance of Section element
48 *
49 * @return void
50 */
51 public function modify_render( $section ){
52
53 }
54
55
56 /**
57 * Add extra controls to section element
58 *
59 * @param Element_Section $section Instance of Section element
60 *
61 * @return void
62 */
63 public function add_controls( $section ){
64
65 }
66
67 /**
68 * Add option for styling the inner container
69 *
70 * @return void
71 */
72 public function add_inner_container_notice( $widget ){
73
74 if( defined('THEME_PRO') && THEME_PRO ){
75 return;
76 }
77
78 $widget->start_controls_section(
79 'aux_pro_inner_container_notice',
80 array(
81 'label' => __( 'Box Container', 'auxin-elements' ),
82 'tab' => Controls_Manager::TAB_STYLE
83 )
84 );
85
86 $widget->add_control(
87 'inner_container_go_pro_notice',
88 array(
89 'type' => Controls_Manager::RAW_HTML,
90 'content_classes' => 'elementor-descriptor',
91 'raw' => '<div class="auxin-elementor-panel-notice">' .
92 '<i class="auxin-elementor-upgrade-notice-icon eicon-favorite" aria-hidden="true"></i>
93 <div class="auxin-elementor-panel-notice-title">' .
94 __( 'Parallax Effect', 'auxin-elements' ) .
95 '</div>
96 <div class="auxin-elementor-panel-notice-message">' .
97 __( 'Container options lets you add border, box shadow and background to box container.', 'auxin-elements' ) .
98 '</div>
99 <div class="auxin-elementor-panel-notice-message">' .
100 __( 'This feature is only available on Phlox Pro.', 'auxin-elements' ) .
101 '</div>
102 <a class="auxin-elementor-panel-notice-link elementor-button elementor-button-default auxin-elementor-go-pro-link" href="http://phlox.pro/go-pro/?utm_source=elementor-panel&utm_medium=phlox-free&utm_campaign=phlox-go-pro&utm_content=inner-container" target="_blank">' .
103 __( 'Get Phlox Pro', 'auxin-elements' ) .
104 '</a>
105 </div>'
106 )
107 );
108
109 $widget->end_controls_section();
110 }
111
112 /**
113 * Adds controls to define background for pseudo elements
114 *
115 * @return void
116 */
117 public function add_pseudo_background_controls( $widget, $section_id, $args ){
118
119 if( 'section' !== $widget->get_name() ){
120 return;
121 }
122
123 // Anchor element sections
124 $target_sections = array('section_custom_css');
125
126 if( ! defined('ELEMENTOR_PRO_VERSION') ) {
127 $target_sections[] = 'section_custom_css_pro';
128 }
129
130 if( ! in_array( $section_id, $target_sections ) ){
131 return;
132 }
133
134 $widget->start_controls_section(
135 'aux_core_background_pseudo_section',
136 array(
137 'label' => __( 'Pseudo Background (developers)', 'auxin-elements' ),
138 'tab' => Controls_Manager::TAB_ADVANCED
139 )
140 );
141
142 $widget->add_control(
143 'background_pseudo_description',
144 array(
145 'raw' => __( 'Adds background to pseudo elements like ::before and ::after selectors. (developers only)', 'auxin-elements' ),
146 'type' => Controls_Manager::RAW_HTML,
147 'content_classes' => 'elementor-descriptor'
148 )
149 );
150
151 $widget->add_control(
152 'background_pseudo_before_heading',
153 array(
154 'label' => __( 'Background ::before', 'auxin-elements' ),
155 'type' => Controls_Manager::HEADING,
156 'separator' => 'before'
157 )
158 );
159
160 $widget->add_group_control(
161 Group_Control_Background::get_type(),
162 array(
163 'name' => 'background_pseudo_before',
164 'types' => array( 'classic', 'gradient'),
165 'selector' => '{{WRAPPER}} .elementor-container:before'
166 )
167 );
168
169 $widget->add_control(
170 'background_pseudo_after_heading',
171 array(
172 'label' => __( 'Background ::after', 'auxin-elements' ),
173 'type' => Controls_Manager::HEADING,
174 'separator' => 'before'
175 )
176 );
177
178 $widget->add_group_control(
179 Group_Control_Background::get_type(),
180 array(
181 'name' => 'background_pseudo_after',
182 'types' => array( 'classic', 'gradient'),
183 'selector' => '{{WRAPPER}} > .elementor-container:after'
184 )
185 );
186
187 $widget->end_controls_section();
188 }
189
190 }
191