Version Description
- Gravity Forms element added
- Post Grid and Post Timeline load more improved
- Load more functionality added for pages and any custom post types
- Custom CSS/JS options removed from options panel
- Few minor improvements
Download this release
Release Info
Developer | re_enter_rupok |
Plugin | Elementor Essential Addons |
Version | 2.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.3
- admin/settings.php +47 -87
- assets/js/load-more.js +4 -3
- elements/gravity-form/gravity-form.php +716 -0
- elements/post-grid/post-grid.php +2 -1
- elements/post-timeline/post-timeline.php +2 -2
- essential_adons_elementor.php +6 -2
- includes/queries.php +106 -36
- readme.txt +14 -4
admin/settings.php
CHANGED
@@ -14,7 +14,7 @@ class Eael_Admin_Settings {
|
|
14 |
* @var array
|
15 |
* @since 2.3.0
|
16 |
*/
|
17 |
-
public $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form' ];
|
18 |
|
19 |
/**
|
20 |
* Will Contain All Components Default Values
|
@@ -48,8 +48,6 @@ class Eael_Admin_Settings {
|
|
48 |
add_action( 'admin_menu', array( $this, 'create_eael_admin_menu' ) );
|
49 |
add_action( 'init', array( $this, 'enqueue_eael_admin_scripts' ) );
|
50 |
add_action( 'wp_ajax_save_settings_with_ajax', array( $this, 'eael_save_settings_with_ajax' ) );
|
51 |
-
add_action( 'wp_head', array( $this, 'eael_add_custom_code_in_wp_head' ), 9999 );
|
52 |
-
add_action( 'wp_footer', array( $this, 'eael_add_custom_js_in_wp_footer' ), 9999 );
|
53 |
|
54 |
}
|
55 |
|
@@ -135,7 +133,6 @@ class Eael_Admin_Settings {
|
|
135 |
<ul>
|
136 |
<li><a href="#general"><i class="fa fa-cogs"></i> General</a></li>
|
137 |
<li><a href="#elements"><i class="fa fa-cubes"></i> Elements</a></li>
|
138 |
-
<li><a href="#custom-css"><i class="fa fa-code"></i> Custom Code</a></li>
|
139 |
<li><a href="#go-pro"><i class="fa fa-bolt"></i> Go Premium</a></li>
|
140 |
<li><a href="#support"><i class="fa fa-ticket"></i> Support</a></li>
|
141 |
</ul>
|
@@ -164,7 +161,7 @@ class Eael_Admin_Settings {
|
|
164 |
<td>
|
165 |
<div class="eael-checkbox">
|
166 |
<p class="title"><?php _e( 'Contact Form 7', 'essential-addons-elementor' ); ?></p>
|
167 |
-
<p class="desc"><?php _e( 'Activate /
|
168 |
<input type="checkbox" id="contact-form-7" name="contact-form-7" <?php checked( 1, $this->eael_get_settings['contact-form-7'], true ); ?> >
|
169 |
<label for="contact-form-7"></label>
|
170 |
</div>
|
@@ -172,7 +169,7 @@ class Eael_Admin_Settings {
|
|
172 |
<td>
|
173 |
<div class="eael-checkbox">
|
174 |
<p class="title"><?php _e( 'Count Down', 'essential-addons-elementor' ); ?></p>
|
175 |
-
<p class="desc"><?php _e( 'Activate /
|
176 |
<input type="checkbox" id="count-down" name="count-down" <?php checked( 1, $this->eael_get_settings['count-down'], true ); ?> >
|
177 |
<label for="count-down"></label>
|
178 |
</div>
|
@@ -180,7 +177,7 @@ class Eael_Admin_Settings {
|
|
180 |
<td>
|
181 |
<div class="eael-checkbox">
|
182 |
<p class="title"><?php _e( 'Creative Button', 'essential-addons-elementor' ); ?></p>
|
183 |
-
<p class="desc"><?php _e( 'Activate /
|
184 |
<input type="checkbox" id="creative-btn" name="creative-btn" <?php checked( 1, $this->eael_get_settings['creative-btn'], true ); ?> >
|
185 |
<label for="creative-btn"></label>
|
186 |
</div>
|
@@ -188,7 +185,7 @@ class Eael_Admin_Settings {
|
|
188 |
<td>
|
189 |
<div class="eael-checkbox">
|
190 |
<p class="title"><?php _e( 'Fancy Text', 'essential-addons-elementor' ); ?></p>
|
191 |
-
<p class="desc"><?php _e( 'Activate /
|
192 |
<input type="checkbox" id="fancy-text" name="fancy-text" <?php checked( 1, $this->eael_get_settings['fancy-text'], true ); ?> >
|
193 |
<label for="fancy-text"></label>
|
194 |
</div>
|
@@ -196,7 +193,7 @@ class Eael_Admin_Settings {
|
|
196 |
<td>
|
197 |
<div class="eael-checkbox">
|
198 |
<p class="title"><?php _e( 'Post Grid', 'essential-addons-elementor' ); ?></p>
|
199 |
-
<p class="desc"><?php _e( 'Activate /
|
200 |
<input type="checkbox" id="post-grid" name="post-grid" <?php checked( 1, $this->eael_get_settings['post-grid'], true ); ?> >
|
201 |
<label for="post-grid"></label>
|
202 |
</div>
|
@@ -206,7 +203,7 @@ class Eael_Admin_Settings {
|
|
206 |
<td>
|
207 |
<div class="eael-checkbox">
|
208 |
<p class="title"><?php _e( 'Post Timeline', 'essential-addons-elementor' ) ?></p>
|
209 |
-
<p class="desc"><?php _e( 'Activate /
|
210 |
<input type="checkbox" id="post-timeline" name="post-timeline" <?php checked( 1, $this->eael_get_settings['post-timeline'], true ); ?> >
|
211 |
<label for="post-timeline"></label>
|
212 |
</div>
|
@@ -214,7 +211,7 @@ class Eael_Admin_Settings {
|
|
214 |
<td>
|
215 |
<div class="eael-checkbox">
|
216 |
<p class="title"><?php _e( 'Product Grid', 'essential-addons-elementor' ) ?></p>
|
217 |
-
<p class="desc"><?php _e( 'Activate /
|
218 |
<input type="checkbox" id="product-grid" name="product-grid" <?php checked( 1, $this->eael_get_settings['product-grid'], true ); ?> >
|
219 |
<label for="product-grid"></label>
|
220 |
</div>
|
@@ -222,7 +219,7 @@ class Eael_Admin_Settings {
|
|
222 |
<td>
|
223 |
<div class="eael-checkbox">
|
224 |
<p class="title"><?php _e( 'Team Member', 'essential-addons-elementor' ) ?></p>
|
225 |
-
<p class="desc"><?php _e( 'Activate /
|
226 |
<input type="checkbox" id="team-members" name="team-members" <?php checked( 1, $this->eael_get_settings['team-members'], true ); ?> >
|
227 |
<label for="team-members"></label>
|
228 |
</div>
|
@@ -230,7 +227,7 @@ class Eael_Admin_Settings {
|
|
230 |
<td>
|
231 |
<div class="eael-checkbox">
|
232 |
<p class="title"><?php _e( 'Testimonials', 'essential-addons-elementor' ) ?></p>
|
233 |
-
<p class="desc"><?php _e( 'Activate /
|
234 |
<input type="checkbox" id="testimonials" name="testimonials" <?php checked( 1, $this->eael_get_settings['testimonials'], true ); ?> >
|
235 |
<label for="testimonials"></label>
|
236 |
</div>
|
@@ -238,7 +235,7 @@ class Eael_Admin_Settings {
|
|
238 |
<td>
|
239 |
<div class="eael-checkbox">
|
240 |
<p class="title"><?php _e( 'We-Forms', 'essential-addons-elementor' ) ?></p>
|
241 |
-
<p class="desc"><?php _e( 'Activate /
|
242 |
<input type="checkbox" id="weforms" name="weforms" <?php checked( 1, $this->eael_get_settings['weforms'], true ); ?> >
|
243 |
<label for="weforms"></label>
|
244 |
</div>
|
@@ -248,7 +245,7 @@ class Eael_Admin_Settings {
|
|
248 |
<td>
|
249 |
<div class="eael-checkbox">
|
250 |
<p class="title"><?php _e( 'Call To Action', 'essential-addons-elementor' ) ?></p>
|
251 |
-
<p class="desc"><?php _e( 'Activate /
|
252 |
<input type="checkbox" id="call-to-action" name="call-to-action" <?php checked( 1, $this->eael_get_settings['call-to-action'], true ); ?> >
|
253 |
<label for="call-to-action"></label>
|
254 |
</div>
|
@@ -256,7 +253,7 @@ class Eael_Admin_Settings {
|
|
256 |
<td>
|
257 |
<div class="eael-checkbox">
|
258 |
<p class="title"><?php _e( 'Flip Box', 'essential-addons-elementor' ) ?></p>
|
259 |
-
<p class="desc"><?php _e( 'Activate /
|
260 |
<input type="checkbox" id="flip-box" name="flip-box" <?php checked( 1, $this->eael_get_settings['flip-box'], true ); ?> >
|
261 |
<label for="flip-box"></label>
|
262 |
</div>
|
@@ -264,7 +261,7 @@ class Eael_Admin_Settings {
|
|
264 |
<td>
|
265 |
<div class="eael-checkbox">
|
266 |
<p class="title"><?php _e( 'Info Box', 'essential-addons-elementor' ) ?></p>
|
267 |
-
<p class="desc"><?php _e( 'Activate /
|
268 |
<input type="checkbox" id="info-box" name="info-box" <?php checked( 1, $this->eael_get_settings['info-box'], true ); ?> >
|
269 |
<label for="info-box"></label>
|
270 |
</div>
|
@@ -272,7 +269,7 @@ class Eael_Admin_Settings {
|
|
272 |
<td>
|
273 |
<div class="eael-checkbox">
|
274 |
<p class="title"><?php _e( 'Dual Color Header', 'essential-addons-elementor' ) ?></p>
|
275 |
-
<p class="desc"><?php _e( 'Activate /
|
276 |
<input type="checkbox" id="dual-header" name="dual-header" <?php checked( 1, $this->eael_get_settings['dual-header'], true ); ?> >
|
277 |
<label for="dual-header"></label>
|
278 |
</div>
|
@@ -280,7 +277,7 @@ class Eael_Admin_Settings {
|
|
280 |
<td>
|
281 |
<div class="eael-checkbox">
|
282 |
<p class="title"><?php _e( 'Pricing Table', 'essential-addons-elementor' ) ?></p>
|
283 |
-
<p class="desc"><?php _e( 'Activate /
|
284 |
<input type="checkbox" id="price-table" name="price-table" <?php checked( 1, $this->eael_get_settings['price-table'], true ); ?> >
|
285 |
<label for="price-table"></label>
|
286 |
</div>
|
@@ -290,9 +287,17 @@ class Eael_Admin_Settings {
|
|
290 |
<td>
|
291 |
<div class="eael-checkbox">
|
292 |
<p class="title"><?php _e( 'Ninja Form', 'essential-addons-elementor' ) ?></p>
|
293 |
-
<p class="desc"><?php _e( 'Activate /
|
294 |
<input type="checkbox" id="ninja-form" name="ninja-form" <?php checked( 1, $this->eael_get_settings['ninja-form'], true ); ?> >
|
295 |
<label for="ninja-form"></label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
</div>
|
297 |
</td>
|
298 |
</tr>
|
@@ -311,7 +316,7 @@ class Eael_Admin_Settings {
|
|
311 |
<?php _e( 'Image Comparison', 'essential-addons-elementor' ); ?>
|
312 |
</p>
|
313 |
<p class="desc">
|
314 |
-
<?php _e( 'Activate /
|
315 |
</p>
|
316 |
<input type="checkbox" id="img-comparison" name="img-comparison" disabled>
|
317 |
<label for="img-comparison" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -323,7 +328,7 @@ class Eael_Admin_Settings {
|
|
323 |
<?php _e( 'Instagram Gallery', 'essential-addons-elementor' ); ?>
|
324 |
</p>
|
325 |
<p class="desc">
|
326 |
-
<?php _e( 'Activate /
|
327 |
</p>
|
328 |
<input type="checkbox" id="instagram-gallery" name="instagram-gallery" disabled>
|
329 |
<label for="instagram-gallery" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -335,7 +340,7 @@ class Eael_Admin_Settings {
|
|
335 |
<?php _e( 'Interactive Promo', 'essential-addons-elementor' ); ?>
|
336 |
</p>
|
337 |
<p class="desc">
|
338 |
-
<?php _e( 'Activate /
|
339 |
</p>
|
340 |
<input type="checkbox" id="interactive-promo" name="interactive-promo" disabled>
|
341 |
<label for="interactive-promo" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -347,7 +352,7 @@ class Eael_Admin_Settings {
|
|
347 |
<?php _e( 'Lightbox', 'essential-addons-elementor' ); ?>
|
348 |
</p>
|
349 |
<p class="desc">
|
350 |
-
<?php _e( 'Activate /
|
351 |
</p>
|
352 |
<input type="checkbox" id="lightbox" name="lightbox" disabled>
|
353 |
<label for="lightbox" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -359,7 +364,7 @@ class Eael_Admin_Settings {
|
|
359 |
<?php _e( 'Post Block', 'essential-addons-elementor' ); ?>
|
360 |
</p>
|
361 |
<p class="desc">
|
362 |
-
<?php _e( 'Activate /
|
363 |
</p>
|
364 |
<input type="checkbox" id="post-block" name="post-block" disabled>
|
365 |
<label for="post-block" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -373,7 +378,7 @@ class Eael_Admin_Settings {
|
|
373 |
<?php _e( 'Testimonial Slider', 'essential-addons-elementor' ) ?>
|
374 |
</p>
|
375 |
<p class="desc">
|
376 |
-
<?php _e( 'Activate /
|
377 |
</p>
|
378 |
<input type="checkbox" id="testimonial-slider" name="testimonial-slider" disabled>
|
379 |
<label for="testimonial-slider" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -385,7 +390,7 @@ class Eael_Admin_Settings {
|
|
385 |
<?php _e( 'Static Product', 'essential-addons-elementor' ) ?>
|
386 |
</p>
|
387 |
<p class="desc">
|
388 |
-
<?php _e( 'Activate /
|
389 |
</p>
|
390 |
<input type="checkbox" id="static-product" name="static-product" disabled>
|
391 |
<label for="static-product" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -397,7 +402,7 @@ class Eael_Admin_Settings {
|
|
397 |
<?php _e( 'Flip Carousel', 'essential-addons-elementor' ) ?>
|
398 |
</p>
|
399 |
<p class="desc">
|
400 |
-
<?php _e( 'Activate /
|
401 |
</p>
|
402 |
<input type="checkbox" id="flip-carousel" name="flip-carousel" disabled>
|
403 |
<label for="flip-carousel" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
@@ -409,12 +414,24 @@ class Eael_Admin_Settings {
|
|
409 |
<?php _e( 'Interactive Cards', 'essential-addons-elementor' ) ?>
|
410 |
</p>
|
411 |
<p class="desc">
|
412 |
-
<?php _e( 'Activate /
|
413 |
</p>
|
414 |
<input type="checkbox" id="interactive-cards" name="interactive-cards" disabled>
|
415 |
<label for="interactive-cards" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
416 |
</div>
|
417 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
</tr>
|
419 |
</table>
|
420 |
<div class="eael-save-btn-wrap">
|
@@ -423,25 +440,6 @@ class Eael_Admin_Settings {
|
|
423 |
</div>
|
424 |
</div>
|
425 |
</div>
|
426 |
-
<div id="custom-css" class="eael-settings-tab">
|
427 |
-
<div class="row">
|
428 |
-
<div class="col-half">
|
429 |
-
<p class="title">Custom CSS</p>
|
430 |
-
<p class="desc">Add your custom CSS code here without <code>style</code> tag.</p>
|
431 |
-
<textarea name="eael-custom-css" id="eael-custom-css" class="eael-form-control" rows="10"><?php if( !empty( $this->eael_get_settings['eael-custom-css'] ) ) : echo $this->eael_get_settings['eael-custom-css']; else : $this->eael_get_settings['eael-custom-css'] = ''; endif; ?></textarea>
|
432 |
-
</div>
|
433 |
-
</div>
|
434 |
-
<div class="row">
|
435 |
-
<div class="col-half">
|
436 |
-
<p class="title">Custom JavaScript</p>
|
437 |
-
<p class="desc">Add your custom JavaScript code here without <code>script</code> tag.</p>
|
438 |
-
<textarea name="eael-custom-js" id="eael-custom-js" class="eael-form-control" rows="10"><?php if( !empty( $this->eael_get_settings['eael-custom-js'] ) ) : echo $this->eael_get_settings['eael-custom-js']; else: $this->eael_get_settings['eael-custom-js'] = ''; endif; ?></textarea>
|
439 |
-
</div>
|
440 |
-
</div>
|
441 |
-
<div class="eael-save-btn-wrap">
|
442 |
-
<input type="submit" value="Save settings" class="button eael-btn"/>
|
443 |
-
</div>
|
444 |
-
</div>
|
445 |
<div id="go-pro" class="eael-settings-tab">
|
446 |
<div class="row go-premium">
|
447 |
<div class="col-half">
|
@@ -516,9 +514,7 @@ class Eael_Admin_Settings {
|
|
516 |
'dual-header' => intval( $settings['dual-header'] ? 1 : 0 ),
|
517 |
'price-table' => intval( $settings['price-table'] ? 1 : 0 ),
|
518 |
'ninja-form' => intval( $settings['ninja-form'] ? 1 : 0 ),
|
519 |
-
|
520 |
-
'eael-custom-css' => wp_unslash( $settings['eael-custom-css'] ),
|
521 |
-
'eael-custom-js' => wp_unslash( $settings['eael-custom-js'] ),
|
522 |
);
|
523 |
update_option( 'eael_save_settings', $this->eael_settings );
|
524 |
return true;
|
@@ -527,42 +523,6 @@ class Eael_Admin_Settings {
|
|
527 |
|
528 |
}
|
529 |
|
530 |
-
/**
|
531 |
-
* Saving custom css in the header
|
532 |
-
* @param
|
533 |
-
* @return string
|
534 |
-
* @since 1.1.2
|
535 |
-
*/
|
536 |
-
public function eael_add_custom_code_in_wp_head() {
|
537 |
-
|
538 |
-
$this->eael_get_settings = get_option( 'eael_save_settings', false );
|
539 |
-
?>
|
540 |
-
<style>
|
541 |
-
<?php echo( $this->eael_get_settings['eael-custom-css'] ); ?>
|
542 |
-
</style>
|
543 |
-
<?php
|
544 |
-
|
545 |
-
}
|
546 |
-
|
547 |
-
/**
|
548 |
-
* Saving custom js in the footer
|
549 |
-
* @param
|
550 |
-
* @return string
|
551 |
-
* @since 1.1.2
|
552 |
-
*/
|
553 |
-
public function eael_add_custom_js_in_wp_footer() {
|
554 |
-
|
555 |
-
$this->eael_get_settings = get_option( 'eael_save_settings', false );
|
556 |
-
?>
|
557 |
-
<script>
|
558 |
-
( function($) {
|
559 |
-
<?php echo ( $this->eael_get_settings['eael-custom-js'] ); ?>
|
560 |
-
} )(jQuery);
|
561 |
-
</script>
|
562 |
-
<?php
|
563 |
-
|
564 |
-
}
|
565 |
-
|
566 |
}
|
567 |
|
568 |
new Eael_Admin_Settings();
|
14 |
* @var array
|
15 |
* @since 2.3.0
|
16 |
*/
|
17 |
+
public $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form', 'gravity-form' ];
|
18 |
|
19 |
/**
|
20 |
* Will Contain All Components Default Values
|
48 |
add_action( 'admin_menu', array( $this, 'create_eael_admin_menu' ) );
|
49 |
add_action( 'init', array( $this, 'enqueue_eael_admin_scripts' ) );
|
50 |
add_action( 'wp_ajax_save_settings_with_ajax', array( $this, 'eael_save_settings_with_ajax' ) );
|
|
|
|
|
51 |
|
52 |
}
|
53 |
|
133 |
<ul>
|
134 |
<li><a href="#general"><i class="fa fa-cogs"></i> General</a></li>
|
135 |
<li><a href="#elements"><i class="fa fa-cubes"></i> Elements</a></li>
|
|
|
136 |
<li><a href="#go-pro"><i class="fa fa-bolt"></i> Go Premium</a></li>
|
137 |
<li><a href="#support"><i class="fa fa-ticket"></i> Support</a></li>
|
138 |
</ul>
|
161 |
<td>
|
162 |
<div class="eael-checkbox">
|
163 |
<p class="title"><?php _e( 'Contact Form 7', 'essential-addons-elementor' ); ?></p>
|
164 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Contact Form 7', 'essential-addons-elementor' ); ?></p>
|
165 |
<input type="checkbox" id="contact-form-7" name="contact-form-7" <?php checked( 1, $this->eael_get_settings['contact-form-7'], true ); ?> >
|
166 |
<label for="contact-form-7"></label>
|
167 |
</div>
|
169 |
<td>
|
170 |
<div class="eael-checkbox">
|
171 |
<p class="title"><?php _e( 'Count Down', 'essential-addons-elementor' ); ?></p>
|
172 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Count Down', 'essential-addons-elementor' ); ?></p>
|
173 |
<input type="checkbox" id="count-down" name="count-down" <?php checked( 1, $this->eael_get_settings['count-down'], true ); ?> >
|
174 |
<label for="count-down"></label>
|
175 |
</div>
|
177 |
<td>
|
178 |
<div class="eael-checkbox">
|
179 |
<p class="title"><?php _e( 'Creative Button', 'essential-addons-elementor' ); ?></p>
|
180 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Creative Button', 'essential-addons-elementor' ); ?></p>
|
181 |
<input type="checkbox" id="creative-btn" name="creative-btn" <?php checked( 1, $this->eael_get_settings['creative-btn'], true ); ?> >
|
182 |
<label for="creative-btn"></label>
|
183 |
</div>
|
185 |
<td>
|
186 |
<div class="eael-checkbox">
|
187 |
<p class="title"><?php _e( 'Fancy Text', 'essential-addons-elementor' ); ?></p>
|
188 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Fancy Text', 'essential-addons-elementor' ); ?></p>
|
189 |
<input type="checkbox" id="fancy-text" name="fancy-text" <?php checked( 1, $this->eael_get_settings['fancy-text'], true ); ?> >
|
190 |
<label for="fancy-text"></label>
|
191 |
</div>
|
193 |
<td>
|
194 |
<div class="eael-checkbox">
|
195 |
<p class="title"><?php _e( 'Post Grid', 'essential-addons-elementor' ); ?></p>
|
196 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Post Grid', 'essential-addons-elementor' ); ?></p>
|
197 |
<input type="checkbox" id="post-grid" name="post-grid" <?php checked( 1, $this->eael_get_settings['post-grid'], true ); ?> >
|
198 |
<label for="post-grid"></label>
|
199 |
</div>
|
203 |
<td>
|
204 |
<div class="eael-checkbox">
|
205 |
<p class="title"><?php _e( 'Post Timeline', 'essential-addons-elementor' ) ?></p>
|
206 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Post Timeline', 'essential-addons-elementor' ); ?></p>
|
207 |
<input type="checkbox" id="post-timeline" name="post-timeline" <?php checked( 1, $this->eael_get_settings['post-timeline'], true ); ?> >
|
208 |
<label for="post-timeline"></label>
|
209 |
</div>
|
211 |
<td>
|
212 |
<div class="eael-checkbox">
|
213 |
<p class="title"><?php _e( 'Product Grid', 'essential-addons-elementor' ) ?></p>
|
214 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Product Grid', 'essential-addons-elementor' ); ?></p>
|
215 |
<input type="checkbox" id="product-grid" name="product-grid" <?php checked( 1, $this->eael_get_settings['product-grid'], true ); ?> >
|
216 |
<label for="product-grid"></label>
|
217 |
</div>
|
219 |
<td>
|
220 |
<div class="eael-checkbox">
|
221 |
<p class="title"><?php _e( 'Team Member', 'essential-addons-elementor' ) ?></p>
|
222 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Team Member', 'essential-addons-elementor' ); ?></p>
|
223 |
<input type="checkbox" id="team-members" name="team-members" <?php checked( 1, $this->eael_get_settings['team-members'], true ); ?> >
|
224 |
<label for="team-members"></label>
|
225 |
</div>
|
227 |
<td>
|
228 |
<div class="eael-checkbox">
|
229 |
<p class="title"><?php _e( 'Testimonials', 'essential-addons-elementor' ) ?></p>
|
230 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Testimonials', 'essential-addons-elementor' ); ?></p>
|
231 |
<input type="checkbox" id="testimonials" name="testimonials" <?php checked( 1, $this->eael_get_settings['testimonials'], true ); ?> >
|
232 |
<label for="testimonials"></label>
|
233 |
</div>
|
235 |
<td>
|
236 |
<div class="eael-checkbox">
|
237 |
<p class="title"><?php _e( 'We-Forms', 'essential-addons-elementor' ) ?></p>
|
238 |
+
<p class="desc"><?php _e( 'Activate / Deactivate WeForms', 'essential-addons-elementor' ); ?></p>
|
239 |
<input type="checkbox" id="weforms" name="weforms" <?php checked( 1, $this->eael_get_settings['weforms'], true ); ?> >
|
240 |
<label for="weforms"></label>
|
241 |
</div>
|
245 |
<td>
|
246 |
<div class="eael-checkbox">
|
247 |
<p class="title"><?php _e( 'Call To Action', 'essential-addons-elementor' ) ?></p>
|
248 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Call To Action', 'essential-addons-elementor' ); ?></p>
|
249 |
<input type="checkbox" id="call-to-action" name="call-to-action" <?php checked( 1, $this->eael_get_settings['call-to-action'], true ); ?> >
|
250 |
<label for="call-to-action"></label>
|
251 |
</div>
|
253 |
<td>
|
254 |
<div class="eael-checkbox">
|
255 |
<p class="title"><?php _e( 'Flip Box', 'essential-addons-elementor' ) ?></p>
|
256 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Flip Box', 'essential-addons-elementor' ); ?></p>
|
257 |
<input type="checkbox" id="flip-box" name="flip-box" <?php checked( 1, $this->eael_get_settings['flip-box'], true ); ?> >
|
258 |
<label for="flip-box"></label>
|
259 |
</div>
|
261 |
<td>
|
262 |
<div class="eael-checkbox">
|
263 |
<p class="title"><?php _e( 'Info Box', 'essential-addons-elementor' ) ?></p>
|
264 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Info Box', 'essential-addons-elementor' ); ?></p>
|
265 |
<input type="checkbox" id="info-box" name="info-box" <?php checked( 1, $this->eael_get_settings['info-box'], true ); ?> >
|
266 |
<label for="info-box"></label>
|
267 |
</div>
|
269 |
<td>
|
270 |
<div class="eael-checkbox">
|
271 |
<p class="title"><?php _e( 'Dual Color Header', 'essential-addons-elementor' ) ?></p>
|
272 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Dual Color Header', 'essential-addons-elementor' ); ?></p>
|
273 |
<input type="checkbox" id="dual-header" name="dual-header" <?php checked( 1, $this->eael_get_settings['dual-header'], true ); ?> >
|
274 |
<label for="dual-header"></label>
|
275 |
</div>
|
277 |
<td>
|
278 |
<div class="eael-checkbox">
|
279 |
<p class="title"><?php _e( 'Pricing Table', 'essential-addons-elementor' ) ?></p>
|
280 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Pricing Table', 'essential-addons-elementor' ); ?></p>
|
281 |
<input type="checkbox" id="price-table" name="price-table" <?php checked( 1, $this->eael_get_settings['price-table'], true ); ?> >
|
282 |
<label for="price-table"></label>
|
283 |
</div>
|
287 |
<td>
|
288 |
<div class="eael-checkbox">
|
289 |
<p class="title"><?php _e( 'Ninja Form', 'essential-addons-elementor' ) ?></p>
|
290 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Ninja Form', 'essential-addons-elementor' ); ?></p>
|
291 |
<input type="checkbox" id="ninja-form" name="ninja-form" <?php checked( 1, $this->eael_get_settings['ninja-form'], true ); ?> >
|
292 |
<label for="ninja-form"></label>
|
293 |
+
</div>
|
294 |
+
</td>
|
295 |
+
<td>
|
296 |
+
<div class="eael-checkbox">
|
297 |
+
<p class="title"><?php _e( 'Gravity Form', 'essential-addons-elementor' ) ?></p>
|
298 |
+
<p class="desc"><?php _e( 'Activate / Deactivate Gravity Form', 'essential-addons-elementor' ); ?></p>
|
299 |
+
<input type="checkbox" id="gravity-form" name="gravity-form" <?php checked( 1, $this->eael_get_settings['gravity-form'], true ); ?> >
|
300 |
+
<label for="gravity-form"></label>
|
301 |
</div>
|
302 |
</td>
|
303 |
</tr>
|
316 |
<?php _e( 'Image Comparison', 'essential-addons-elementor' ); ?>
|
317 |
</p>
|
318 |
<p class="desc">
|
319 |
+
<?php _e( 'Activate / Deactivate Image Comparison', 'essential-addons-elementor' ); ?>
|
320 |
</p>
|
321 |
<input type="checkbox" id="img-comparison" name="img-comparison" disabled>
|
322 |
<label for="img-comparison" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
328 |
<?php _e( 'Instagram Gallery', 'essential-addons-elementor' ); ?>
|
329 |
</p>
|
330 |
<p class="desc">
|
331 |
+
<?php _e( 'Activate / Deactivate Instagram Gallery', 'essential-addons-elementor' ); ?>
|
332 |
</p>
|
333 |
<input type="checkbox" id="instagram-gallery" name="instagram-gallery" disabled>
|
334 |
<label for="instagram-gallery" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
340 |
<?php _e( 'Interactive Promo', 'essential-addons-elementor' ); ?>
|
341 |
</p>
|
342 |
<p class="desc">
|
343 |
+
<?php _e( 'Activate / Deactivate Interactive Promo', 'essential-addons-elementor' ); ?>
|
344 |
</p>
|
345 |
<input type="checkbox" id="interactive-promo" name="interactive-promo" disabled>
|
346 |
<label for="interactive-promo" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
352 |
<?php _e( 'Lightbox', 'essential-addons-elementor' ); ?>
|
353 |
</p>
|
354 |
<p class="desc">
|
355 |
+
<?php _e( 'Activate / Deactivate Lightbox', 'essential-addons-elementor' ); ?>
|
356 |
</p>
|
357 |
<input type="checkbox" id="lightbox" name="lightbox" disabled>
|
358 |
<label for="lightbox" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
364 |
<?php _e( 'Post Block', 'essential-addons-elementor' ); ?>
|
365 |
</p>
|
366 |
<p class="desc">
|
367 |
+
<?php _e( 'Activate / Deactivate Post Block', 'essential-addons-elementor' ); ?>
|
368 |
</p>
|
369 |
<input type="checkbox" id="post-block" name="post-block" disabled>
|
370 |
<label for="post-block" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
378 |
<?php _e( 'Testimonial Slider', 'essential-addons-elementor' ) ?>
|
379 |
</p>
|
380 |
<p class="desc">
|
381 |
+
<?php _e( 'Activate / Deactivate Testimonial Slider', 'essential-addons-elementor' ); ?>
|
382 |
</p>
|
383 |
<input type="checkbox" id="testimonial-slider" name="testimonial-slider" disabled>
|
384 |
<label for="testimonial-slider" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
390 |
<?php _e( 'Static Product', 'essential-addons-elementor' ) ?>
|
391 |
</p>
|
392 |
<p class="desc">
|
393 |
+
<?php _e( 'Activate / Deactivate Static Product', 'essential-addons-elementor' ); ?>
|
394 |
</p>
|
395 |
<input type="checkbox" id="static-product" name="static-product" disabled>
|
396 |
<label for="static-product" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
402 |
<?php _e( 'Flip Carousel', 'essential-addons-elementor' ) ?>
|
403 |
</p>
|
404 |
<p class="desc">
|
405 |
+
<?php _e( 'Activate / Deactivate Flip Carousel', 'essential-addons-elementor' ); ?>
|
406 |
</p>
|
407 |
<input type="checkbox" id="flip-carousel" name="flip-carousel" disabled>
|
408 |
<label for="flip-carousel" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
414 |
<?php _e( 'Interactive Cards', 'essential-addons-elementor' ) ?>
|
415 |
</p>
|
416 |
<p class="desc">
|
417 |
+
<?php _e( 'Activate / Deactivate Interactive Cards', 'essential-addons-elementor' ); ?>
|
418 |
</p>
|
419 |
<input type="checkbox" id="interactive-cards" name="interactive-cards" disabled>
|
420 |
<label for="interactive-cards" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
421 |
</div>
|
422 |
</td>
|
423 |
+
<td>
|
424 |
+
<div class="eael-checkbox">
|
425 |
+
<p class="title">
|
426 |
+
<?php _e( 'Content Timeline', 'essential-addons-elementor' ) ?>
|
427 |
+
</p>
|
428 |
+
<p class="desc">
|
429 |
+
<?php _e( 'Activate / Deactivate Content Timeline', 'essential-addons-elementor' ); ?>
|
430 |
+
</p>
|
431 |
+
<input type="checkbox" id="content-timeline" name="content-timeline" disabled>
|
432 |
+
<label for="content-timeline" class="<?php if( (bool) $this->is_pro === false ) : echo 'eael-get-pro'; endif; ?>"></label>
|
433 |
+
</div>
|
434 |
+
</td>
|
435 |
</tr>
|
436 |
</table>
|
437 |
<div class="eael-save-btn-wrap">
|
440 |
</div>
|
441 |
</div>
|
442 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
<div id="go-pro" class="eael-settings-tab">
|
444 |
<div class="row go-premium">
|
445 |
<div class="col-half">
|
514 |
'dual-header' => intval( $settings['dual-header'] ? 1 : 0 ),
|
515 |
'price-table' => intval( $settings['price-table'] ? 1 : 0 ),
|
516 |
'ninja-form' => intval( $settings['ninja-form'] ? 1 : 0 ),
|
517 |
+
'gravity-form' => intval( $settings['gravity-form'] ? 1 : 0 ),
|
|
|
|
|
518 |
);
|
519 |
update_option( 'eael_save_settings', $this->eael_settings );
|
520 |
return true;
|
523 |
|
524 |
}
|
525 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
}
|
527 |
|
528 |
new Eael_Admin_Settings();
|
assets/js/load-more.js
CHANGED
@@ -13,6 +13,7 @@
|
|
13 |
}
|
14 |
// Settings Values
|
15 |
var settingsValue = {
|
|
|
16 |
perPage: settings.perPage,
|
17 |
postOrder: settings.postOrder,
|
18 |
showImage: settings.showImage,
|
@@ -34,9 +35,9 @@
|
|
34 |
|
35 |
// Rest Api Url Settings
|
36 |
if( settings.categories == '' ) {
|
37 |
-
var restUrl = optionsValue.siteUrl+'wp-json/wp/v2/
|
38 |
}else {
|
39 |
-
var restUrl = optionsValue.siteUrl+'wp-json/wp/v2/
|
40 |
}
|
41 |
|
42 |
$.ajax({
|
@@ -91,7 +92,7 @@
|
|
91 |
html += '<div class="eael-timeline-post-image" ' + feature_image + ' ></div>';
|
92 |
if ( settingsValue.showExcerpt == 1 ) {
|
93 |
html += '<div class="eael-timeline-post-excerpt">';
|
94 |
-
html += '' + data[i].excerpt.rendered.split(/\s+/).slice(0, settingsValue.excerptLength).join(" ")
|
95 |
html += '</div>';
|
96 |
}
|
97 |
if ( settingsValue.showTitle == 1 ) {
|
13 |
}
|
14 |
// Settings Values
|
15 |
var settingsValue = {
|
16 |
+
postType: settings.postType,
|
17 |
perPage: settings.perPage,
|
18 |
postOrder: settings.postOrder,
|
19 |
showImage: settings.showImage,
|
35 |
|
36 |
// Rest Api Url Settings
|
37 |
if( settings.categories == '' ) {
|
38 |
+
var restUrl = optionsValue.siteUrl+'wp-json/wp/v2/'+settings.postType+'?per_page='+settingsValue.perPage+'&offset='+offset+'&order='+settingsValue.postOrder+'&_embed';
|
39 |
}else {
|
40 |
+
var restUrl = optionsValue.siteUrl+'wp-json/wp/v2/'+settings.postType+'?categories='+settingsValue.categories+'&per_page='+settingsValue.perPage+'&offset='+offset+'&order='+settingsValue.postOrder+'&_embed';
|
41 |
}
|
42 |
|
43 |
$.ajax({
|
92 |
html += '<div class="eael-timeline-post-image" ' + feature_image + ' ></div>';
|
93 |
if ( settingsValue.showExcerpt == 1 ) {
|
94 |
html += '<div class="eael-timeline-post-excerpt">';
|
95 |
+
html += '' + data[i].excerpt.rendered.split(/\s+/).slice(0, settingsValue.excerptLength).join(" ");
|
96 |
html += '</div>';
|
97 |
}
|
98 |
if ( settingsValue.showTitle == 1 ) {
|
elements/gravity-form/gravity-form.php
ADDED
@@ -0,0 +1,716 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Elementor;
|
3 |
+
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
+
|
6 |
+
|
7 |
+
class Widget_Eael_GravityForm extends Widget_Base {
|
8 |
+
|
9 |
+
public function get_name() {
|
10 |
+
return 'eael-gravity';
|
11 |
+
}
|
12 |
+
|
13 |
+
public function get_title() {
|
14 |
+
return esc_html__( 'EA Gravity Form', 'essential-addons-elementor' );
|
15 |
+
}
|
16 |
+
|
17 |
+
public function get_icon() {
|
18 |
+
return 'fa fa-envelope-o';
|
19 |
+
}
|
20 |
+
|
21 |
+
public function get_categories() {
|
22 |
+
return [ 'essential-addons-elementor' ];
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function _register_controls() {
|
26 |
+
|
27 |
+
$this->start_controls_section(
|
28 |
+
'eael_section_gravity_form',
|
29 |
+
[
|
30 |
+
'label' => esc_html__( 'Gravity Form', 'essential-addons-elementor' )
|
31 |
+
]
|
32 |
+
);
|
33 |
+
|
34 |
+
$this->add_control(
|
35 |
+
'eael_gravity_form',
|
36 |
+
[
|
37 |
+
'label' => esc_html__( 'Select gravity form', 'essential-addons-elementor' ),
|
38 |
+
'label_block' => true,
|
39 |
+
'type' => Controls_Manager::SELECT,
|
40 |
+
'options' => eael_select_gravity_form(),
|
41 |
+
]
|
42 |
+
);
|
43 |
+
|
44 |
+
$this->end_controls_section();
|
45 |
+
|
46 |
+
|
47 |
+
$this->start_controls_section(
|
48 |
+
'eael_section_gravity_styles',
|
49 |
+
[
|
50 |
+
'label' => esc_html__( 'Form Container Styles', 'essential-addons-elementor' ),
|
51 |
+
'tab' => Controls_Manager::TAB_STYLE
|
52 |
+
]
|
53 |
+
);
|
54 |
+
|
55 |
+
$this->add_control(
|
56 |
+
'eael_gravity_background',
|
57 |
+
[
|
58 |
+
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
59 |
+
'type' => Controls_Manager::COLOR,
|
60 |
+
'default' => '',
|
61 |
+
'selectors' => [
|
62 |
+
'{{WRAPPER}} .eael-gravity-container' => 'background-color: {{VALUE}};',
|
63 |
+
],
|
64 |
+
]
|
65 |
+
);
|
66 |
+
|
67 |
+
$this->add_responsive_control(
|
68 |
+
'eael_gravity_alignment',
|
69 |
+
[
|
70 |
+
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
71 |
+
'type' => Controls_Manager::CHOOSE,
|
72 |
+
'label_block' => true,
|
73 |
+
'options' => [
|
74 |
+
'default' => [
|
75 |
+
'title' => __( 'Default', 'essential-addons-elementor' ),
|
76 |
+
'icon' => 'fa fa-ban',
|
77 |
+
],
|
78 |
+
'left' => [
|
79 |
+
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
80 |
+
'icon' => 'fa fa-align-left',
|
81 |
+
],
|
82 |
+
'center' => [
|
83 |
+
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
84 |
+
'icon' => 'fa fa-align-center',
|
85 |
+
],
|
86 |
+
'right' => [
|
87 |
+
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
88 |
+
'icon' => 'fa fa-align-right',
|
89 |
+
],
|
90 |
+
],
|
91 |
+
'default' => 'default',
|
92 |
+
'prefix_class' => 'eael-gravity-form-align-',
|
93 |
+
]
|
94 |
+
);
|
95 |
+
|
96 |
+
$this->add_responsive_control(
|
97 |
+
'eael_gravity_width',
|
98 |
+
[
|
99 |
+
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
100 |
+
'type' => Controls_Manager::SLIDER,
|
101 |
+
'size_units' => [ 'px', 'em', '%' ],
|
102 |
+
'range' => [
|
103 |
+
'px' => [
|
104 |
+
'min' => 10,
|
105 |
+
'max' => 1500,
|
106 |
+
],
|
107 |
+
'em' => [
|
108 |
+
'min' => 1,
|
109 |
+
'max' => 80,
|
110 |
+
],
|
111 |
+
],
|
112 |
+
'selectors' => [
|
113 |
+
'{{WRAPPER}} .eael-gravity-container' => 'width: {{SIZE}}{{UNIT}};',
|
114 |
+
],
|
115 |
+
]
|
116 |
+
);
|
117 |
+
|
118 |
+
$this->add_responsive_control(
|
119 |
+
'eael_gravity_max_width',
|
120 |
+
[
|
121 |
+
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
122 |
+
'type' => Controls_Manager::SLIDER,
|
123 |
+
'size_units' => [ 'px', 'em', '%' ],
|
124 |
+
'range' => [
|
125 |
+
'px' => [
|
126 |
+
'min' => 10,
|
127 |
+
'max' => 1500,
|
128 |
+
],
|
129 |
+
'em' => [
|
130 |
+
'min' => 1,
|
131 |
+
'max' => 80,
|
132 |
+
],
|
133 |
+
],
|
134 |
+
'selectors' => [
|
135 |
+
'{{WRAPPER}} .eael-gravity-container' => 'max-width: {{SIZE}}{{UNIT}};',
|
136 |
+
],
|
137 |
+
]
|
138 |
+
);
|
139 |
+
|
140 |
+
$this->add_responsive_control(
|
141 |
+
'eael_gravity_margin',
|
142 |
+
[
|
143 |
+
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
144 |
+
'type' => Controls_Manager::DIMENSIONS,
|
145 |
+
'size_units' => [ 'px', 'em', '%' ],
|
146 |
+
'selectors' => [
|
147 |
+
'{{WRAPPER}} .eael-gravity-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
148 |
+
],
|
149 |
+
]
|
150 |
+
);
|
151 |
+
|
152 |
+
$this->add_responsive_control(
|
153 |
+
'eael_gravity_padding',
|
154 |
+
[
|
155 |
+
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
156 |
+
'type' => Controls_Manager::DIMENSIONS,
|
157 |
+
'size_units' => [ 'px', 'em', '%' ],
|
158 |
+
'selectors' => [
|
159 |
+
'{{WRAPPER}} .eael-gravity-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
160 |
+
],
|
161 |
+
]
|
162 |
+
);
|
163 |
+
|
164 |
+
$this->add_control(
|
165 |
+
'eael_gravity_border_radius',
|
166 |
+
[
|
167 |
+
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
168 |
+
'type' => Controls_Manager::DIMENSIONS,
|
169 |
+
'separator' => 'before',
|
170 |
+
'size_units' => [ 'px' ],
|
171 |
+
'selectors' => [
|
172 |
+
'{{WRAPPER}} .eael-gravity-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
173 |
+
],
|
174 |
+
]
|
175 |
+
);
|
176 |
+
|
177 |
+
$this->add_group_control(
|
178 |
+
Group_Control_Border::get_type(),
|
179 |
+
[
|
180 |
+
'name' => 'eael_gravity_border',
|
181 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container',
|
182 |
+
]
|
183 |
+
);
|
184 |
+
|
185 |
+
$this->add_group_control(
|
186 |
+
Group_Control_Box_Shadow::get_type(),
|
187 |
+
[
|
188 |
+
'name' => 'eael_gravity_box_shadow',
|
189 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container',
|
190 |
+
]
|
191 |
+
);
|
192 |
+
|
193 |
+
$this->end_controls_section();
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Form Fields Styles
|
197 |
+
*/
|
198 |
+
$this->start_controls_section(
|
199 |
+
'eael_section_gravity_field_styles',
|
200 |
+
[
|
201 |
+
'label' => esc_html__( 'Form Fields Styles', 'essential-addons-elementor' ),
|
202 |
+
'tab' => Controls_Manager::TAB_STYLE
|
203 |
+
]
|
204 |
+
);
|
205 |
+
|
206 |
+
$this->add_control(
|
207 |
+
'eael_gravity_input_background',
|
208 |
+
[
|
209 |
+
'label' => esc_html__( 'Input Field Background', 'essential-addons-elementor' ),
|
210 |
+
'type' => Controls_Manager::COLOR,
|
211 |
+
'selectors' => [
|
212 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
213 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
214 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
215 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
216 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
217 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
218 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'background-color: {{VALUE}};',
|
219 |
+
],
|
220 |
+
]
|
221 |
+
);
|
222 |
+
|
223 |
+
|
224 |
+
$this->add_responsive_control(
|
225 |
+
'eael_gravity_input_width',
|
226 |
+
[
|
227 |
+
'label' => esc_html__( 'Input Width', 'essential-addons-elementor' ),
|
228 |
+
'type' => Controls_Manager::SLIDER,
|
229 |
+
'size_units' => [ 'px', 'em', '%' ],
|
230 |
+
'range' => [
|
231 |
+
'px' => [
|
232 |
+
'min' => 10,
|
233 |
+
'max' => 1500,
|
234 |
+
],
|
235 |
+
'em' => [
|
236 |
+
'min' => 1,
|
237 |
+
'max' => 80,
|
238 |
+
],
|
239 |
+
],
|
240 |
+
'selectors' => [
|
241 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
242 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
243 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
244 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
245 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
246 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]' => 'width: {{SIZE}}{{UNIT}};',
|
247 |
+
],
|
248 |
+
]
|
249 |
+
);
|
250 |
+
|
251 |
+
$this->add_responsive_control(
|
252 |
+
'eael_gravity_textarea_width',
|
253 |
+
[
|
254 |
+
'label' => esc_html__( 'Textarea Width', 'essential-addons-elementor' ),
|
255 |
+
'type' => Controls_Manager::SLIDER,
|
256 |
+
'size_units' => [ 'px', 'em', '%' ],
|
257 |
+
'range' => [
|
258 |
+
'px' => [
|
259 |
+
'min' => 10,
|
260 |
+
'max' => 1500,
|
261 |
+
],
|
262 |
+
'em' => [
|
263 |
+
'min' => 1,
|
264 |
+
'max' => 80,
|
265 |
+
],
|
266 |
+
],
|
267 |
+
'selectors' => [
|
268 |
+
'{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'width: {{SIZE}}{{UNIT}};',
|
269 |
+
],
|
270 |
+
]
|
271 |
+
);
|
272 |
+
|
273 |
+
$this->add_responsive_control(
|
274 |
+
'eael_gravity_input_padding',
|
275 |
+
[
|
276 |
+
'label' => esc_html__( 'Fields Padding', 'essential-addons-elementor' ),
|
277 |
+
'type' => Controls_Manager::DIMENSIONS,
|
278 |
+
'size_units' => [ 'px', 'em', '%' ],
|
279 |
+
'selectors' => [
|
280 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
281 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
282 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
283 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
284 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
285 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
286 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
287 |
+
],
|
288 |
+
]
|
289 |
+
);
|
290 |
+
|
291 |
+
|
292 |
+
|
293 |
+
$this->add_control(
|
294 |
+
'eael_gravity_input_border_radius',
|
295 |
+
[
|
296 |
+
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
297 |
+
'type' => Controls_Manager::DIMENSIONS,
|
298 |
+
'separator' => 'before',
|
299 |
+
'size_units' => [ 'px' ],
|
300 |
+
'selectors' => [
|
301 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
302 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
303 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
304 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
305 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
306 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
307 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
308 |
+
],
|
309 |
+
]
|
310 |
+
);
|
311 |
+
|
312 |
+
|
313 |
+
$this->add_group_control(
|
314 |
+
Group_Control_Border::get_type(),
|
315 |
+
[
|
316 |
+
'name' => 'eael_gravity_input_border',
|
317 |
+
'selector' => '
|
318 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
319 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
320 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
321 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
322 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
323 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
324 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
325 |
+
]
|
326 |
+
);
|
327 |
+
|
328 |
+
|
329 |
+
$this->add_group_control(
|
330 |
+
Group_Control_Box_Shadow::get_type(),
|
331 |
+
[
|
332 |
+
'name' => 'eael_gravity_input_box_shadow',
|
333 |
+
'selector' => '
|
334 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
335 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
336 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
337 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
338 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
339 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
340 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
341 |
+
]
|
342 |
+
);
|
343 |
+
|
344 |
+
$this->add_control(
|
345 |
+
'eael_gravity_focus_heading',
|
346 |
+
[
|
347 |
+
'type' => Controls_Manager::HEADING,
|
348 |
+
'label' => esc_html__( 'Focus State Style', 'essential-addons-elementor' ),
|
349 |
+
'separator' => 'before',
|
350 |
+
]
|
351 |
+
);
|
352 |
+
|
353 |
+
|
354 |
+
$this->add_group_control(
|
355 |
+
Group_Control_Box_Shadow::get_type(),
|
356 |
+
[
|
357 |
+
'name' => 'eael_gravity_input_focus_box_shadow',
|
358 |
+
'selector' => '
|
359 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="text"]:focus,
|
360 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"]:focus,
|
361 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"]:focus,
|
362 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"]:focus,
|
363 |
+
{{WRAPPER}} .eael-gravity-container .gfield select:focus,
|
364 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]:focus,
|
365 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea:focus',
|
366 |
+
]
|
367 |
+
);
|
368 |
+
|
369 |
+
$this->add_control(
|
370 |
+
'eael_gravity_input_focus_border',
|
371 |
+
[
|
372 |
+
'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
|
373 |
+
'type' => Controls_Manager::COLOR,
|
374 |
+
'selectors' => [
|
375 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"]:focus,
|
376 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"]:focus,
|
377 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"]:focus,
|
378 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"]:focus,
|
379 |
+
{{WRAPPER}} .eael-gravity-container .gfield select:focus,
|
380 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]:focus,
|
381 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea:focus' => 'border-color: {{VALUE}};',
|
382 |
+
],
|
383 |
+
]
|
384 |
+
);
|
385 |
+
|
386 |
+
$this->end_controls_section();
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Typography
|
390 |
+
*/
|
391 |
+
$this->start_controls_section(
|
392 |
+
'eael_section_gravity_typography',
|
393 |
+
[
|
394 |
+
'label' => esc_html__( 'Color & Typography', 'essential-addons-elementor' ),
|
395 |
+
'tab' => Controls_Manager::TAB_STYLE
|
396 |
+
]
|
397 |
+
);
|
398 |
+
|
399 |
+
|
400 |
+
$this->add_control(
|
401 |
+
'eael_gravity_label_color',
|
402 |
+
[
|
403 |
+
'label' => esc_html__( 'Label Color', 'essential-addons-elementor' ),
|
404 |
+
'type' => Controls_Manager::COLOR,
|
405 |
+
'selectors' => [
|
406 |
+
'{{WRAPPER}} .eael-gravity-container, {{WRAPPER}} .eael-gravity-container .nf-field-label label' => 'color: {{VALUE}};',
|
407 |
+
],
|
408 |
+
]
|
409 |
+
);
|
410 |
+
|
411 |
+
$this->add_control(
|
412 |
+
'eael_gravity_field_color',
|
413 |
+
[
|
414 |
+
'label' => esc_html__( 'Field Font Color', 'essential-addons-elementor' ),
|
415 |
+
'type' => Controls_Manager::COLOR,
|
416 |
+
'selectors' => [
|
417 |
+
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
418 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
419 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
420 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
421 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
422 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
423 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'color: {{VALUE}};',
|
424 |
+
],
|
425 |
+
]
|
426 |
+
);
|
427 |
+
|
428 |
+
$this->add_control(
|
429 |
+
'eael_gravity_placeholder_color',
|
430 |
+
[
|
431 |
+
'label' => esc_html__( 'Placeholder Font Color', 'essential-addons-elementor' ),
|
432 |
+
'type' => Controls_Manager::COLOR,
|
433 |
+
'selectors' => [
|
434 |
+
'{{WRAPPER}} .eael-gravity-container ::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
435 |
+
'{{WRAPPER}} .eael-gravity-container ::-moz-placeholder' => 'color: {{VALUE}};',
|
436 |
+
'{{WRAPPER}} .eael-gravity-container ::-ms-input-placeholder' => 'color: {{VALUE}};',
|
437 |
+
],
|
438 |
+
]
|
439 |
+
);
|
440 |
+
|
441 |
+
|
442 |
+
$this->add_control(
|
443 |
+
'eael_gravity_label_heading',
|
444 |
+
[
|
445 |
+
'type' => Controls_Manager::HEADING,
|
446 |
+
'label' => esc_html__( 'Label Typography', 'essential-addons-elementor' ),
|
447 |
+
'separator' => 'before',
|
448 |
+
]
|
449 |
+
);
|
450 |
+
|
451 |
+
$this->add_group_control(
|
452 |
+
Group_Control_Typography::get_type(),
|
453 |
+
[
|
454 |
+
'name' => 'eael_gravity_label_typography',
|
455 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container, {{WRAPPER}} .eael-gravity-container .wpuf-label label',
|
456 |
+
]
|
457 |
+
);
|
458 |
+
|
459 |
+
|
460 |
+
$this->add_control(
|
461 |
+
'eael_gravity_heading_input_field',
|
462 |
+
[
|
463 |
+
'type' => Controls_Manager::HEADING,
|
464 |
+
'label' => esc_html__( 'Input Fields Typography', 'essential-addons-elementor' ),
|
465 |
+
'separator' => 'before',
|
466 |
+
]
|
467 |
+
);
|
468 |
+
|
469 |
+
$this->add_group_control(
|
470 |
+
Group_Control_Typography::get_type(),
|
471 |
+
[
|
472 |
+
'name' => 'eael_gravity_input_field_typography',
|
473 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
474 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
475 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
476 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
477 |
+
{{WRAPPER}} .eael-gravity-container .gfield select,
|
478 |
+
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
479 |
+
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
480 |
+
]
|
481 |
+
);
|
482 |
+
|
483 |
+
$this->end_controls_section();
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Button Style
|
487 |
+
*/
|
488 |
+
$this->start_controls_section(
|
489 |
+
'eael_section_gravity_submit_button_styles',
|
490 |
+
[
|
491 |
+
'label' => esc_html__( 'Submit Button Styles', 'essential-addons-elementor' ),
|
492 |
+
'tab' => Controls_Manager::TAB_STYLE
|
493 |
+
]
|
494 |
+
);
|
495 |
+
|
496 |
+
$this->add_responsive_control(
|
497 |
+
'eael_gravity_submit_btn_width',
|
498 |
+
[
|
499 |
+
'label' => esc_html__( 'Button Width', 'essential-addons-elementor' ),
|
500 |
+
'type' => Controls_Manager::SLIDER,
|
501 |
+
'size_units' => [ 'px', 'em', '%' ],
|
502 |
+
'range' => [
|
503 |
+
'px' => [
|
504 |
+
'min' => 10,
|
505 |
+
'max' => 1500,
|
506 |
+
],
|
507 |
+
'em' => [
|
508 |
+
'min' => 1,
|
509 |
+
'max' => 80,
|
510 |
+
],
|
511 |
+
],
|
512 |
+
'selectors' => [
|
513 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'width: {{SIZE}}{{UNIT}};',
|
514 |
+
],
|
515 |
+
]
|
516 |
+
);
|
517 |
+
|
518 |
+
$this->add_responsive_control(
|
519 |
+
'eael_gravity_submit_btn_alignment',
|
520 |
+
[
|
521 |
+
'label' => esc_html__( 'Button Alignment', 'essential-addons-elementor' ),
|
522 |
+
'type' => Controls_Manager::CHOOSE,
|
523 |
+
'label_block' => true,
|
524 |
+
'options' => [
|
525 |
+
'default' => [
|
526 |
+
'title' => __( 'Default', 'essential-addons-elementor' ),
|
527 |
+
'icon' => 'fa fa-ban',
|
528 |
+
],
|
529 |
+
'left' => [
|
530 |
+
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
531 |
+
'icon' => 'fa fa-align-left',
|
532 |
+
],
|
533 |
+
'center' => [
|
534 |
+
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
535 |
+
'icon' => 'fa fa-align-center',
|
536 |
+
],
|
537 |
+
'right' => [
|
538 |
+
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
539 |
+
'icon' => 'fa fa-align-right',
|
540 |
+
],
|
541 |
+
],
|
542 |
+
'default' => 'default',
|
543 |
+
'prefix_class' => 'eael-gravity-form-btn-align-',
|
544 |
+
]
|
545 |
+
);
|
546 |
+
|
547 |
+
$this->add_group_control(
|
548 |
+
Group_Control_Typography::get_type(),
|
549 |
+
[
|
550 |
+
'name' => 'eael_gravity_submit_btn_typography',
|
551 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
552 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container .gform_button',
|
553 |
+
]
|
554 |
+
);
|
555 |
+
|
556 |
+
$this->add_responsive_control(
|
557 |
+
'eael_gravity_submit_btn_margin',
|
558 |
+
[
|
559 |
+
'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
|
560 |
+
'type' => Controls_Manager::DIMENSIONS,
|
561 |
+
'size_units' => [ 'px', 'em', '%' ],
|
562 |
+
'selectors' => [
|
563 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
564 |
+
],
|
565 |
+
]
|
566 |
+
);
|
567 |
+
|
568 |
+
$this->add_responsive_control(
|
569 |
+
'eael_gravity_submit_btn_padding',
|
570 |
+
[
|
571 |
+
'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),
|
572 |
+
'type' => Controls_Manager::DIMENSIONS,
|
573 |
+
'size_units' => [ 'px', 'em', '%' ],
|
574 |
+
'selectors' => [
|
575 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
576 |
+
],
|
577 |
+
]
|
578 |
+
);
|
579 |
+
|
580 |
+
$this->start_controls_tabs( 'eael_gravity_submit_button_tabs' );
|
581 |
+
|
582 |
+
$this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
|
583 |
+
|
584 |
+
$this->add_control(
|
585 |
+
'eael_gravity_submit_btn_text_color',
|
586 |
+
[
|
587 |
+
'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
|
588 |
+
'type' => Controls_Manager::COLOR,
|
589 |
+
'selectors' => [
|
590 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'color: {{VALUE}};',
|
591 |
+
],
|
592 |
+
]
|
593 |
+
);
|
594 |
+
|
595 |
+
$this->add_control(
|
596 |
+
'eael_gravity_submit_btn_background_color',
|
597 |
+
[
|
598 |
+
'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
|
599 |
+
'type' => Controls_Manager::COLOR,
|
600 |
+
'selectors' => [
|
601 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'background-color: {{VALUE}};',
|
602 |
+
],
|
603 |
+
]
|
604 |
+
);
|
605 |
+
|
606 |
+
$this->add_group_control(
|
607 |
+
Group_Control_Border::get_type(),
|
608 |
+
[
|
609 |
+
'name' => 'eael_gravity_submit_btn_border',
|
610 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container .gform_button',
|
611 |
+
]
|
612 |
+
);
|
613 |
+
|
614 |
+
$this->add_control(
|
615 |
+
'eael_gravity_submit_btn_border_radius',
|
616 |
+
[
|
617 |
+
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
618 |
+
'type' => Controls_Manager::SLIDER,
|
619 |
+
'range' => [
|
620 |
+
'px' => [
|
621 |
+
'max' => 100,
|
622 |
+
],
|
623 |
+
],
|
624 |
+
'selectors' => [
|
625 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'border-radius: {{SIZE}}px;',
|
626 |
+
],
|
627 |
+
]
|
628 |
+
);
|
629 |
+
|
630 |
+
|
631 |
+
|
632 |
+
$this->end_controls_tab();
|
633 |
+
|
634 |
+
$this->start_controls_tab( 'eael_gravity_submit_btn_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-elementor' ) ] );
|
635 |
+
|
636 |
+
$this->add_control(
|
637 |
+
'eael_gravity_submit_btn_hover_text_color',
|
638 |
+
[
|
639 |
+
'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
|
640 |
+
'type' => Controls_Manager::COLOR,
|
641 |
+
'selectors' => [
|
642 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button:hover' => 'color: {{VALUE}};',
|
643 |
+
],
|
644 |
+
]
|
645 |
+
);
|
646 |
+
|
647 |
+
$this->add_control(
|
648 |
+
'eael_gravity_submit_btn_hover_background_color',
|
649 |
+
[
|
650 |
+
'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),
|
651 |
+
'type' => Controls_Manager::COLOR,
|
652 |
+
'selectors' => [
|
653 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button:hover' => 'background-color: {{VALUE}};',
|
654 |
+
],
|
655 |
+
]
|
656 |
+
);
|
657 |
+
|
658 |
+
$this->add_control(
|
659 |
+
'eael_gravity_submit_btn_hover_border_color',
|
660 |
+
[
|
661 |
+
'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
|
662 |
+
'type' => Controls_Manager::COLOR,
|
663 |
+
'selectors' => [
|
664 |
+
'{{WRAPPER}} .eael-gravity-container .gform_button:hover' => 'border-color: {{VALUE}};',
|
665 |
+
],
|
666 |
+
]
|
667 |
+
);
|
668 |
+
|
669 |
+
$this->end_controls_tab();
|
670 |
+
|
671 |
+
$this->end_controls_tabs();
|
672 |
+
|
673 |
+
|
674 |
+
$this->add_group_control(
|
675 |
+
Group_Control_Box_Shadow::get_type(),
|
676 |
+
[
|
677 |
+
'name' => 'eael_gravity_submit_btn_box_shadow',
|
678 |
+
'selector' => '{{WRAPPER}} .eael-gravity-container .gform_button',
|
679 |
+
]
|
680 |
+
);
|
681 |
+
|
682 |
+
|
683 |
+
$this->end_controls_section();
|
684 |
+
|
685 |
+
}
|
686 |
+
|
687 |
+
|
688 |
+
protected function render( ) {
|
689 |
+
|
690 |
+
$settings = $this->get_settings();
|
691 |
+
|
692 |
+
|
693 |
+
?>
|
694 |
+
|
695 |
+
|
696 |
+
<?php if ( ! empty( $settings['eael_gravity_form'] ) ) : ?>
|
697 |
+
<div class="eael-gravity-container">
|
698 |
+
<?php echo do_shortcode( '[gravityform id="'.$settings['eael_gravity_form'].'" title="true" description="true"]' ); ?>
|
699 |
+
</div>
|
700 |
+
<?php endif; ?>
|
701 |
+
|
702 |
+
<?php
|
703 |
+
|
704 |
+
}
|
705 |
+
|
706 |
+
protected function content_template() {''
|
707 |
+
|
708 |
+
?>
|
709 |
+
|
710 |
+
|
711 |
+
<?php
|
712 |
+
}
|
713 |
+
}
|
714 |
+
|
715 |
+
|
716 |
+
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_GravityForm() );
|
elements/post-grid/post-grid.php
CHANGED
@@ -814,7 +814,7 @@ class Widget_Eael_Post_Grid extends Widget_Base {
|
|
814 |
}
|
815 |
}else {
|
816 |
$categories_id_string = '';
|
817 |
-
$total_post = wp_count_posts()->publish;
|
818 |
}
|
819 |
|
820 |
?>
|
@@ -919,6 +919,7 @@ jQuery(document).ready(function($) {
|
|
919 |
}
|
920 |
|
921 |
var settings = {
|
|
|
922 |
perPage: parseInt( <?php echo $settings['eael_posts_count'] ?>, 10 ),
|
923 |
postOrder: '<?php echo $settings['eael_post_order'] ?>',
|
924 |
showImage: <?php echo $settings['eael_show_image']; ?>,
|
814 |
}
|
815 |
}else {
|
816 |
$categories_id_string = '';
|
817 |
+
$total_post = wp_count_posts( $settings['eael_post_type'] )->publish;
|
818 |
}
|
819 |
|
820 |
?>
|
919 |
}
|
920 |
|
921 |
var settings = {
|
922 |
+
postType: '<?php echo $settings['eael_post_type']; ?>',
|
923 |
perPage: parseInt( <?php echo $settings['eael_posts_count'] ?>, 10 ),
|
924 |
postOrder: '<?php echo $settings['eael_post_order'] ?>',
|
925 |
showImage: <?php echo $settings['eael_show_image']; ?>,
|
elements/post-timeline/post-timeline.php
CHANGED
@@ -713,11 +713,10 @@ class Widget_PostTimeline extends Widget_Base {
|
|
713 |
}
|
714 |
}else {
|
715 |
$categories_id_string = '';
|
716 |
-
$total_post = wp_count_posts()->publish;
|
717 |
}
|
718 |
|
719 |
?>
|
720 |
-
|
721 |
<div id="eael-post-timeline-<?php echo esc_attr($this->get_id()); ?>" class="eael-post-timeline">
|
722 |
<div class="eael-post-timeline eael-post-appender-<?php echo esc_attr( $this->get_id() ); ?>">
|
723 |
<?php
|
@@ -780,6 +779,7 @@ jQuery(document).ready(function($) {
|
|
780 |
}
|
781 |
|
782 |
var settings = {
|
|
|
783 |
perPage: parseInt( <?php echo $settings['eael_posts_count'] ?>, 10 ),
|
784 |
postOrder: '<?php echo $settings['eael_post_order'] ?>',
|
785 |
showImage: <?php echo $settings['eael_show_image']; ?>,
|
713 |
}
|
714 |
}else {
|
715 |
$categories_id_string = '';
|
716 |
+
$total_post = wp_count_posts( $settings['eael_post_type'] )->publish;
|
717 |
}
|
718 |
|
719 |
?>
|
|
|
720 |
<div id="eael-post-timeline-<?php echo esc_attr($this->get_id()); ?>" class="eael-post-timeline">
|
721 |
<div class="eael-post-timeline eael-post-appender-<?php echo esc_attr( $this->get_id() ); ?>">
|
722 |
<?php
|
779 |
}
|
780 |
|
781 |
var settings = {
|
782 |
+
postType: '<?php echo $settings['eael_post_type']; ?>',
|
783 |
perPage: parseInt( <?php echo $settings['eael_posts_count'] ?>, 10 ),
|
784 |
postOrder: '<?php echo $settings['eael_post_order'] ?>',
|
785 |
showImage: <?php echo $settings['eael_show_image']; ?>,
|
essential_adons_elementor.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: The ultimate elements library for Elementor page builder plugin for WordPress.
|
5 |
* Plugin URI: https://essential-addons.com/elementor/
|
6 |
* Author: Codetic
|
7 |
-
* Version: 2.2.
|
8 |
* Author URI: http://www.codetic.net
|
9 |
*
|
10 |
* Text Domain: essential-addons-elementor
|
@@ -22,7 +22,7 @@ require_once ESSENTIAL_ADDONS_EL_PATH.'admin/settings.php';
|
|
22 |
|
23 |
function add_eael_elements(){
|
24 |
|
25 |
-
$eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form' ];
|
26 |
$eael_default_settings = array_fill_keys( $eael_default_keys, true );
|
27 |
|
28 |
$is_component_active = get_option( 'eael_save_settings', $eael_default_settings );
|
@@ -82,6 +82,10 @@ function add_eael_elements(){
|
|
82 |
if( function_exists( 'Ninja_Forms' ) && $is_component_active['ninja-form'] ) {
|
83 |
require_once ESSENTIAL_ADDONS_EL_PATH.'elements/ninja-form/ninja-form.php';
|
84 |
}
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
add_action('elementor/widgets/widgets_registered','add_eael_elements');
|
87 |
|
4 |
* Description: The ultimate elements library for Elementor page builder plugin for WordPress.
|
5 |
* Plugin URI: https://essential-addons.com/elementor/
|
6 |
* Author: Codetic
|
7 |
+
* Version: 2.2.3
|
8 |
* Author URI: http://www.codetic.net
|
9 |
*
|
10 |
* Text Domain: essential-addons-elementor
|
22 |
|
23 |
function add_eael_elements(){
|
24 |
|
25 |
+
$eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form', 'gravity-form' ];
|
26 |
$eael_default_settings = array_fill_keys( $eael_default_keys, true );
|
27 |
|
28 |
$is_component_active = get_option( 'eael_save_settings', $eael_default_settings );
|
82 |
if( function_exists( 'Ninja_Forms' ) && $is_component_active['ninja-form'] ) {
|
83 |
require_once ESSENTIAL_ADDONS_EL_PATH.'elements/ninja-form/ninja-form.php';
|
84 |
}
|
85 |
+
if( class_exists( 'GFForms' ) && $is_component_active['gravity-form'] ) {
|
86 |
+
require_once ESSENTIAL_ADDONS_EL_PATH.'elements/gravity-form/gravity-form.php';
|
87 |
+
}
|
88 |
+
|
89 |
}
|
90 |
add_action('elementor/widgets/widgets_registered','add_eael_elements');
|
91 |
|
includes/queries.php
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
$defaults = array(
|
6 |
'posts_per_page' => 5,
|
7 |
'offset' => 0,
|
@@ -16,34 +20,60 @@ function eael_get_post_data($args){
|
|
16 |
'post_type' => 'post',
|
17 |
'post_mime_type' => '',
|
18 |
'post_parent' => '',
|
19 |
-
'author'
|
20 |
-
'author_name'
|
21 |
'post_status' => 'publish',
|
22 |
'suppress_filters' => true
|
23 |
);
|
24 |
|
25 |
-
$atts = wp_parse_args($args
|
26 |
|
27 |
-
$posts = get_posts($atts);
|
28 |
|
29 |
return $posts;
|
30 |
}
|
31 |
|
32 |
-
|
|
|
|
|
|
|
33 |
function eael_get_post_types(){
|
34 |
-
|
35 |
$eael_cpts = get_post_types( array( 'public' => true, 'show_in_nav_menus' => true ) );
|
36 |
$eael_exclude_cpts = array( 'elementor_library', 'attachment', 'product' );
|
37 |
|
38 |
foreach ( $eael_exclude_cpts as $exclude_cpt ) {
|
39 |
unset($eael_cpts[$exclude_cpt]);
|
40 |
}
|
41 |
-
|
42 |
$post_types = array_merge($eael_cpts);
|
43 |
return $post_types;
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
function eael_get_post_settings($settings){
|
48 |
$post_args['post_type'] = $settings['eael_post_type'];
|
49 |
|
@@ -59,6 +89,12 @@ function eael_get_post_settings($settings){
|
|
59 |
return $post_args;
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
function eael_get_excerpt_by_id($post_id,$excerpt_length){
|
63 |
$the_post = get_post($post_id); //Gets post ID
|
64 |
|
@@ -80,6 +116,10 @@ function eael_get_excerpt_by_id($post_id,$excerpt_length){
|
|
80 |
return $the_excerpt;
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
83 |
function eael_get_thumbnail_sizes(){
|
84 |
$sizes = get_intermediate_image_sizes();
|
85 |
foreach($sizes as $s){
|
@@ -89,6 +129,10 @@ function eael_get_thumbnail_sizes(){
|
|
89 |
return $ret;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
92 |
function eael_get_post_orderby_options(){
|
93 |
$orderby = array(
|
94 |
'ID' => 'Post ID',
|
@@ -105,73 +149,85 @@ function eael_get_post_orderby_options(){
|
|
105 |
return $orderby;
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
108 |
function eael_post_type_categories(){
|
109 |
-
$terms = get_terms( array(
|
110 |
'taxonomy' => 'category',
|
111 |
'hide_empty' => true,
|
112 |
));
|
113 |
-
|
114 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
115 |
foreach ( $terms as $term ) {
|
116 |
$options[ $term->term_id ] = $term->name;
|
117 |
}
|
118 |
}
|
119 |
-
|
120 |
return $options;
|
121 |
}
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
126 |
function eael_woocommerce_product_categories(){
|
127 |
$terms = get_terms( array(
|
128 |
'taxonomy' => 'product_cat',
|
129 |
'hide_empty' => true,
|
130 |
));
|
131 |
-
|
132 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
133 |
foreach ( $terms as $term ) {
|
134 |
$options[ $term->slug ] = $term->name;
|
135 |
}
|
136 |
return $options;
|
137 |
}
|
138 |
-
|
139 |
-
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
142 |
function eael_woocommerce_product_get_product_by_id(){
|
143 |
$postlist = get_posts(array(
|
144 |
'post_type' => 'product',
|
145 |
'showposts' => 9999,
|
146 |
));
|
147 |
$posts = array();
|
148 |
-
|
149 |
if ( ! empty( $postlist ) && ! is_wp_error( $postlist ) ){
|
150 |
foreach ( $postlist as $post ) {
|
151 |
$options[ $post->ID ] = $post->post_title;
|
152 |
}
|
153 |
return $options;
|
154 |
-
|
155 |
}
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
158 |
function eael_woocommerce_product_categories_by_id(){
|
159 |
$terms = get_terms( array(
|
160 |
'taxonomy' => 'product_cat',
|
161 |
'hide_empty' => true,
|
162 |
));
|
163 |
-
|
164 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
165 |
foreach ( $terms as $term ) {
|
166 |
$options[ $term->term_id ] = $term->name;
|
167 |
}
|
168 |
return $options;
|
169 |
}
|
170 |
-
|
171 |
-
}
|
172 |
|
173 |
-
|
174 |
|
|
|
|
|
|
|
175 |
if ( function_exists( 'wpcf7' ) ) {
|
176 |
function eael_select_contact_form(){
|
177 |
$wpcf7_form_list = get_posts(array(
|
@@ -179,33 +235,47 @@ function eael_select_contact_form(){
|
|
179 |
'showposts' => 999,
|
180 |
));
|
181 |
$posts = array();
|
182 |
-
|
183 |
if ( ! empty( $wpcf7_form_list ) && ! is_wp_error( $wpcf7_form_list ) ){
|
184 |
foreach ( $wpcf7_form_list as $post ) {
|
185 |
$options[ $post->ID ] = $post->post_title;
|
186 |
-
}
|
187 |
return $options;
|
188 |
}
|
189 |
}
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
|
|
192 |
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
-
|
195 |
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
-
|
198 |
-
$wpuf_form_list = get_posts(array(
|
199 |
'post_type' => 'wpuf_contact_form',
|
200 |
'showposts' => 999,
|
201 |
));
|
202 |
$posts = array();
|
203 |
-
|
204 |
-
if ( ! empty( $wpuf_form_list ) && ! is_wp_error( $wpuf_form_list ) ){
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
}
|
210 |
-
}
|
211 |
|
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* Get Post Data
|
5 |
+
* @param array $args
|
6 |
+
* @return array
|
7 |
+
*/
|
8 |
+
function eael_get_post_data( $args ) {
|
9 |
$defaults = array(
|
10 |
'posts_per_page' => 5,
|
11 |
'offset' => 0,
|
20 |
'post_type' => 'post',
|
21 |
'post_mime_type' => '',
|
22 |
'post_parent' => '',
|
23 |
+
'author' => '',
|
24 |
+
'author_name' => '',
|
25 |
'post_status' => 'publish',
|
26 |
'suppress_filters' => true
|
27 |
);
|
28 |
|
29 |
+
$atts = wp_parse_args( $args, $defaults );
|
30 |
|
31 |
+
$posts = get_posts( $atts );
|
32 |
|
33 |
return $posts;
|
34 |
}
|
35 |
|
36 |
+
/**
|
37 |
+
* Get All POst Types
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
function eael_get_post_types(){
|
41 |
+
|
42 |
$eael_cpts = get_post_types( array( 'public' => true, 'show_in_nav_menus' => true ) );
|
43 |
$eael_exclude_cpts = array( 'elementor_library', 'attachment', 'product' );
|
44 |
|
45 |
foreach ( $eael_exclude_cpts as $exclude_cpt ) {
|
46 |
unset($eael_cpts[$exclude_cpt]);
|
47 |
}
|
48 |
+
|
49 |
$post_types = array_merge($eael_cpts);
|
50 |
return $post_types;
|
51 |
}
|
52 |
|
53 |
+
/**
|
54 |
+
* Add REST API support to an already registered post type.
|
55 |
+
*/
|
56 |
+
add_action( 'init', 'eael_custom_post_type_rest_support', 25 );
|
57 |
+
function eael_custom_post_type_rest_support() {
|
58 |
+
global $wp_post_types;
|
59 |
+
|
60 |
+
$post_types = eael_get_post_types();
|
61 |
+
foreach( $post_types as $post_type ) {
|
62 |
+
$post_type_name = $post_type;
|
63 |
+
if( isset( $wp_post_types[ $post_type_name ] ) ) {
|
64 |
+
$wp_post_types[$post_type_name]->show_in_rest = true;
|
65 |
+
$wp_post_types[$post_type_name]->rest_base = $post_type_name;
|
66 |
+
$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
}
|
71 |
|
72 |
+
/**
|
73 |
+
* Post Settings Parameter
|
74 |
+
* @param array $settings
|
75 |
+
* @return array
|
76 |
+
*/
|
77 |
function eael_get_post_settings($settings){
|
78 |
$post_args['post_type'] = $settings['eael_post_type'];
|
79 |
|
89 |
return $post_args;
|
90 |
}
|
91 |
|
92 |
+
/**
|
93 |
+
* Getting Excerpts By Post Id
|
94 |
+
* @param int $post_id
|
95 |
+
* @param int $excerpt_length
|
96 |
+
* @return string
|
97 |
+
*/
|
98 |
function eael_get_excerpt_by_id($post_id,$excerpt_length){
|
99 |
$the_post = get_post($post_id); //Gets post ID
|
100 |
|
116 |
return $the_excerpt;
|
117 |
}
|
118 |
|
119 |
+
/**
|
120 |
+
* Get Post Thumbnail Size
|
121 |
+
* @return array
|
122 |
+
*/
|
123 |
function eael_get_thumbnail_sizes(){
|
124 |
$sizes = get_intermediate_image_sizes();
|
125 |
foreach($sizes as $s){
|
129 |
return $ret;
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* POst Orderby Options
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
function eael_get_post_orderby_options(){
|
137 |
$orderby = array(
|
138 |
'ID' => 'Post ID',
|
149 |
return $orderby;
|
150 |
}
|
151 |
|
152 |
+
/**
|
153 |
+
* Get Post Categories
|
154 |
+
* @return array
|
155 |
+
*/
|
156 |
function eael_post_type_categories(){
|
157 |
+
$terms = get_terms( array(
|
158 |
'taxonomy' => 'category',
|
159 |
'hide_empty' => true,
|
160 |
));
|
161 |
+
|
162 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
163 |
foreach ( $terms as $term ) {
|
164 |
$options[ $term->term_id ] = $term->name;
|
165 |
}
|
166 |
}
|
167 |
+
|
168 |
return $options;
|
169 |
}
|
170 |
|
171 |
+
/**
|
172 |
+
* WooCommerce Product Query
|
173 |
+
* @return array
|
174 |
+
*/
|
175 |
function eael_woocommerce_product_categories(){
|
176 |
$terms = get_terms( array(
|
177 |
'taxonomy' => 'product_cat',
|
178 |
'hide_empty' => true,
|
179 |
));
|
180 |
+
|
181 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
182 |
foreach ( $terms as $term ) {
|
183 |
$options[ $term->slug ] = $term->name;
|
184 |
}
|
185 |
return $options;
|
186 |
}
|
|
|
|
|
187 |
}
|
188 |
|
189 |
+
/**
|
190 |
+
* WooCommerce Get Product By Id
|
191 |
+
* @return array
|
192 |
+
*/
|
193 |
function eael_woocommerce_product_get_product_by_id(){
|
194 |
$postlist = get_posts(array(
|
195 |
'post_type' => 'product',
|
196 |
'showposts' => 9999,
|
197 |
));
|
198 |
$posts = array();
|
199 |
+
|
200 |
if ( ! empty( $postlist ) && ! is_wp_error( $postlist ) ){
|
201 |
foreach ( $postlist as $post ) {
|
202 |
$options[ $post->ID ] = $post->post_title;
|
203 |
}
|
204 |
return $options;
|
205 |
+
|
206 |
}
|
207 |
}
|
208 |
|
209 |
+
/**
|
210 |
+
* WooCommerce Get Product Category By Id
|
211 |
+
* @return array
|
212 |
+
*/
|
213 |
function eael_woocommerce_product_categories_by_id(){
|
214 |
$terms = get_terms( array(
|
215 |
'taxonomy' => 'product_cat',
|
216 |
'hide_empty' => true,
|
217 |
));
|
218 |
+
|
219 |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
|
220 |
foreach ( $terms as $term ) {
|
221 |
$options[ $term->term_id ] = $term->name;
|
222 |
}
|
223 |
return $options;
|
224 |
}
|
|
|
|
|
225 |
|
226 |
+
}
|
227 |
|
228 |
+
/**
|
229 |
+
* Get Contact Form 7 [ if exists ]
|
230 |
+
*/
|
231 |
if ( function_exists( 'wpcf7' ) ) {
|
232 |
function eael_select_contact_form(){
|
233 |
$wpcf7_form_list = get_posts(array(
|
235 |
'showposts' => 999,
|
236 |
));
|
237 |
$posts = array();
|
238 |
+
|
239 |
if ( ! empty( $wpcf7_form_list ) && ! is_wp_error( $wpcf7_form_list ) ){
|
240 |
foreach ( $wpcf7_form_list as $post ) {
|
241 |
$options[ $post->ID ] = $post->post_title;
|
242 |
+
}
|
243 |
return $options;
|
244 |
}
|
245 |
}
|
246 |
}
|
247 |
|
248 |
+
/**
|
249 |
+
* Get Gravity Form [ if exists ]
|
250 |
+
*/
|
251 |
+
|
252 |
+
function eael_select_gravity_form() {
|
253 |
|
254 |
+
$forms = RGFormsModel::get_forms( null, 'title' );
|
255 |
+
foreach( $forms as $form ) {
|
256 |
+
$options[ $form->id ] = $form->title;
|
257 |
+
}
|
258 |
+
return $options;
|
259 |
|
260 |
+
}
|
261 |
|
262 |
+
/**
|
263 |
+
* Get WeForms Form List
|
264 |
+
* @return array
|
265 |
+
*/
|
266 |
+
function eael_select_weform() {
|
267 |
|
268 |
+
$wpuf_form_list = get_posts( array(
|
|
|
269 |
'post_type' => 'wpuf_contact_form',
|
270 |
'showposts' => 999,
|
271 |
));
|
272 |
$posts = array();
|
273 |
+
|
274 |
+
if ( ! empty( $wpuf_form_list ) && ! is_wp_error( $wpuf_form_list ) ) {
|
275 |
+
foreach ( $wpuf_form_list as $post ) {
|
276 |
+
$options[ $post->ID ] = $post->post_title;
|
277 |
+
}
|
278 |
+
return $options;
|
279 |
}
|
|
|
280 |
|
281 |
+
}
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Elementor Essential Addons ===
|
2 |
-
Contributors: Codetic, re_enter_rupok, robicse11128
|
3 |
Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.2.
|
7 |
License: GPLv3
|
8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
9 |
|
@@ -20,7 +20,7 @@ Ultimate elements library for Elementor WordPress Page Builder. Lots of useful
|
|
20 |
|
21 |
### Features
|
22 |
|
23 |
-
*
|
24 |
* Fully Customizable
|
25 |
* Unlimited Design Options
|
26 |
* Elements Control option
|
@@ -38,6 +38,7 @@ Ultimate elements library for Elementor WordPress Page Builder. Lots of useful
|
|
38 |
* [Testimonials](https://essential-addons.com/elementor/testimonials/)
|
39 |
* [WooCommerce Product Grid](https://essential-addons.com/elementor/woo-product-grid/)
|
40 |
* [Contact Form 7](https://essential-addons.com/elementor/contact-form-7/)
|
|
|
41 |
* [Ninja Forms](https://essential-addons.com/elementor/ninja-forms/)
|
42 |
* [weForms](https://essential-addons.com/elementor/weforms/)
|
43 |
* [Info Box](https://essential-addons.com/elementor/info-box/)
|
@@ -59,6 +60,7 @@ Ultimate elements library for Elementor WordPress Page Builder. Lots of useful
|
|
59 |
* [Static Product](https://essential-addons.com/elementor/static-product/)
|
60 |
* [Flip Carousel](https://essential-addons.com/elementor/flip-carousel/)
|
61 |
* [Interactive Cards](https://essential-addons.com/elementor/interactive-cards/)
|
|
|
62 |
|
63 |
|
64 |
More coming soon (weekly update) ...
|
@@ -93,6 +95,14 @@ Your existing elements/content will work with premium version. So you won't lose
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= 2.2.2 =
|
97 |
|
98 |
- Ninja Forms element added
|
1 |
=== Elementor Essential Addons ===
|
2 |
+
Contributors: Codetic, re_enter_rupok, Asif2BD, robicse11128
|
3 |
Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.9
|
6 |
+
Stable tag: 2.2.3
|
7 |
License: GPLv3
|
8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
9 |
|
20 |
|
21 |
### Features
|
22 |
|
23 |
+
* 17+ Stunning Elements (Free)
|
24 |
* Fully Customizable
|
25 |
* Unlimited Design Options
|
26 |
* Elements Control option
|
38 |
* [Testimonials](https://essential-addons.com/elementor/testimonials/)
|
39 |
* [WooCommerce Product Grid](https://essential-addons.com/elementor/woo-product-grid/)
|
40 |
* [Contact Form 7](https://essential-addons.com/elementor/contact-form-7/)
|
41 |
+
* [Gravity Forms](https://essential-addons.com/elementor/gravity-forms/)
|
42 |
* [Ninja Forms](https://essential-addons.com/elementor/ninja-forms/)
|
43 |
* [weForms](https://essential-addons.com/elementor/weforms/)
|
44 |
* [Info Box](https://essential-addons.com/elementor/info-box/)
|
60 |
* [Static Product](https://essential-addons.com/elementor/static-product/)
|
61 |
* [Flip Carousel](https://essential-addons.com/elementor/flip-carousel/)
|
62 |
* [Interactive Cards](https://essential-addons.com/elementor/interactive-cards/)
|
63 |
+
* [Content Timeline](https://essential-addons.com/elementor/content-timeline/)
|
64 |
|
65 |
|
66 |
More coming soon (weekly update) ...
|
95 |
|
96 |
== Changelog ==
|
97 |
|
98 |
+
= 2.2.3 =
|
99 |
+
|
100 |
+
- Gravity Forms element added
|
101 |
+
- Post Grid and Post Timeline load more improved
|
102 |
+
- Load more functionality added for pages and any custom post types
|
103 |
+
- Custom CSS/JS options removed from options panel
|
104 |
+
- Few minor improvements
|
105 |
+
|
106 |
= 2.2.2 =
|
107 |
|
108 |
- Ninja Forms element added
|