Premium Addons for Elementor - Version 1.02

Version Description

Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 1.02
Comparing to
See all releases

Code changes from version 1.01 to 1.02

assets/css/premium-addons.css CHANGED
@@ -348,6 +348,9 @@
348
  transform: translate3d(0, 200%, 0);
349
  text-align: center;
350
  }
 
 
 
351
  .premium_banner_animation5:hover .premium_addons-banner-ib-content,
352
  .premium_banner_animation5:hover .premium_addons-banner-ib-content * {
353
  opacity: 1!important;
348
  transform: translate3d(0, 200%, 0);
349
  text-align: center;
350
  }
351
+ .premium_banner_animation5 .premium_addons-banner-ib-title {
352
+ margin: 10px 0;
353
+ }
354
  .premium_banner_animation5:hover .premium_addons-banner-ib-content,
355
  .premium_banner_animation5:hover .premium_addons-banner-ib-content * {
356
  opacity: 1!important;
premium-addons.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Premium Addons for Elementor
4
- Description: Page Builder Add-ons for Elementor
5
  Plugin URI: https://premiumaddons.com
6
- Version: 1.01
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-leap13
@@ -78,6 +78,7 @@ define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
78
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets') );
79
  add_action( 'elementor/frontend/after_register_styles', array( $this, 'frontendafter_style') );
80
  add_action( 'elementor/preview/enqueue_styles', array( $this, 'elementor_preview_styles' ) );
 
81
  }
82
 
83
 
@@ -210,7 +211,24 @@ define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
210
  1
211
  );
212
  }
 
 
 
 
 
 
 
 
 
 
213
  }
 
 
 
 
 
 
 
214
 
215
 
216
 
1
  <?php
2
  /*
3
  Plugin Name: Premium Addons for Elementor
4
+ Description: This Plugin Includes Elementor Page Builder’s Premium Addon Elements.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 1.02
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-leap13
78
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets') );
79
  add_action( 'elementor/frontend/after_register_styles', array( $this, 'frontendafter_style') );
80
  add_action( 'elementor/preview/enqueue_styles', array( $this, 'elementor_preview_styles' ) );
81
+ add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 2 );
82
  }
83
 
84
 
211
  1
212
  );
213
  }
214
+ function plugin_row_meta( $plugin_meta, $plugin_file ) {
215
+ $row_meta = [
216
+ 'docs' => '<a href="http://premiumaddons.com/" title="' . esc_attr( __( 'Visit Plugin Site', 'premium_elementor' ) ) . '" target="_blank">' . __( 'Visit Plugin Site', 'premium_elementor' ) . '</a>',
217
+ ];
218
+
219
+ $plugin_meta = array_merge( $plugin_meta, $row_meta );
220
+
221
+
222
+ return $plugin_meta;
223
+ }
224
  }
225
+ require_once('wp-updates-plugin.php');
226
+ new WPUpdatesPluginUpdater_1837( 'http://wp-updates.com/api/2/plugin', plugin_basename(__FILE__));
227
+ /**
228
+ * @since 1.1.4
229
+ * @access public
230
+ */
231
+
232
 
233
 
234
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: leap13
3
  Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
4
  Donate link: http://premiumaddons.com
5
  Requires at least: WordPress 4.5
6
- Tested up to: WordPress 4.9
7
  Requires PHP: 5.4
8
  License: GPL v3.0
9
  License URI: https://opensource.org/licenses/GPL-3.0
3
  Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, page builder
4
  Donate link: http://premiumaddons.com
5
  Requires at least: WordPress 4.5
6
+ Tested up to: WordPress 4.9.1
7
  Requires PHP: 5.4
8
  License: GPL v3.0
9
  License URI: https://opensource.org/licenses/GPL-3.0
widgets/premium-banner.php CHANGED
@@ -182,12 +182,12 @@ class Premium_Banner_Widget extends Widget_Base {
182
  'default' => 'premium_banner_animation1',
183
  'description' => esc_html__( 'Select animation on the banner', 'premium_elementor' ),
184
  'options' => [
185
- 'premium_banner_animation1' => 'Style One',
186
- 'premium_banner_animation5' => 'Style Two',
187
- 'premium_banner_animation13' => 'Style Three',
188
- 'premium_banner_animation2' => 'Style Four',
189
- 'premium_banner_animation4' => 'Style Five',
190
- 'premium_banner_animation6' => 'Style Six'
191
  ]
192
  ]
193
  );
@@ -197,6 +197,7 @@ class Premium_Banner_Widget extends Widget_Base {
197
  [
198
  'label' => esc_html__( 'Title BG color', 'premium_elementor' ),
199
  'type' => Controls_Manager::COLOR,
 
200
  'scheme' => [
201
  'type' => Scheme_Color::get_type(),
202
  'value' => Scheme_Color::COLOR_1,
@@ -204,7 +205,10 @@ class Premium_Banner_Widget extends Widget_Base {
204
  'description' => esc_html__( 'Title Background Color', 'premium_elementor' ),
205
  'condition' => [
206
  'premium_banner_image_animation' => 'premium_banner_animation5'
207
- ]
 
 
 
208
  ]
209
  );
210
 
@@ -422,13 +426,6 @@ class Premium_Banner_Widget extends Widget_Base {
422
  .elementor-widget-premium-addon-banner .premium_addons-banner-ib-title {
423
  background: transparent;
424
  }
425
-
426
-
427
- <?php if( $settings['premium_banner_image_animation'] == 'premium_banner_animation5') : ?>
428
- .premium_banner_animation5 .premium_addons-banner-ib-desc {
429
- background: <?php echo $settings['premium_banner_style2_title_bg']; ?>
430
- }
431
- <?php endif; ?>
432
  </style>
433
  </div>
434
 
182
  'default' => 'premium_banner_animation1',
183
  'description' => esc_html__( 'Select animation on the banner', 'premium_elementor' ),
184
  'options' => [
185
+ 'premium_banner_animation1' => 'Effect 1',
186
+ 'premium_banner_animation5' => 'Effect 2',
187
+ 'premium_banner_animation13' => 'Effect 3',
188
+ 'premium_banner_animation2' => 'Effect 4',
189
+ 'premium_banner_animation4' => 'Effect 5',
190
+ 'premium_banner_animation6' => 'Effect 6'
191
  ]
192
  ]
193
  );
197
  [
198
  'label' => esc_html__( 'Title BG color', 'premium_elementor' ),
199
  'type' => Controls_Manager::COLOR,
200
+ 'default' => '#f2f2f2',
201
  'scheme' => [
202
  'type' => Scheme_Color::get_type(),
203
  'value' => Scheme_Color::COLOR_1,
205
  'description' => esc_html__( 'Title Background Color', 'premium_elementor' ),
206
  'condition' => [
207
  'premium_banner_image_animation' => 'premium_banner_animation5'
208
+ ],
209
+ 'selectors' => [
210
+ '{{WRAPPER}} .premium_banner_animation5 .premium_addons-banner-ib-desc' => 'background: {{VALUE}};',
211
+ ],
212
  ]
213
  );
214
 
426
  .elementor-widget-premium-addon-banner .premium_addons-banner-ib-title {
427
  background: transparent;
428
  }
 
 
 
 
 
 
 
429
  </style>
430
  </div>
431
 
widgets/premium-maps.php CHANGED
@@ -20,7 +20,7 @@ class Premium_Maps_Widget extends Widget_Base
20
  }
21
 
22
  public function get_icon() {
23
- return 'pa-pa-post';
24
  }
25
 
26
  public function get_categories() {
20
  }
21
 
22
  public function get_icon() {
23
+ return 'pa pa-indicator';
24
  }
25
 
26
  public function get_categories() {
widgets/premium-title.php CHANGED
@@ -406,7 +406,10 @@ class Premium_Title_Widget extends Widget_Base
406
  [
407
  'label' => esc_html__('Title Color', 'premium_elementor'),
408
  'type' => Controls_Manager::COLOR,
409
- 'default' => '#6ec1e4',
 
 
 
410
  'selectors' => [
411
  '{{WRAPPER}} .premium-title-header' => 'color: {{VALUE}};',
412
  ],
406
  [
407
  'label' => esc_html__('Title Color', 'premium_elementor'),
408
  'type' => Controls_Manager::COLOR,
409
+ 'scheme' => [
410
+ 'type' => Scheme_Color::get_type(),
411
+ 'value' => Scheme_Color::COLOR_1,
412
+ ],
413
  'selectors' => [
414
  '{{WRAPPER}} .premium-title-header' => 'color: {{VALUE}};',
415
  ],
wp-updates-plugin.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ WPUpdates Plugin Updater Class
4
+ http://wp-updates.com
5
+ v2.0
6
+
7
+ Example Usage:
8
+ require_once('wp-updates-plugin.php');
9
+ new WPUpdatesPluginUpdater_1837( 'http://wp-updates.com/api/2/plugin', plugin_basename(__FILE__) );
10
+ */
11
+
12
+ if( !class_exists('WPUpdatesPluginUpdater_1837') ) {
13
+ class WPUpdatesPluginUpdater_1837 {
14
+
15
+ var $api_url;
16
+ var $plugin_id = 1837;
17
+ var $plugin_path;
18
+ var $plugin_slug;
19
+ var $license_key;
20
+
21
+ function __construct( $api_url, $plugin_path, $license_key = null ) {
22
+ $this->api_url = $api_url;
23
+ $this->plugin_path = $plugin_path;
24
+ $this->license_key = $license_key;
25
+ if(strstr($plugin_path, '/')) list ($t1, $t2) = explode('/', $plugin_path);
26
+ else $t2 = $plugin_path;
27
+ $this->plugin_slug = str_replace('.php', '', $t2);
28
+
29
+ add_filter( 'pre_set_site_transient_update_plugins', array(&$this, 'check_for_update') );
30
+ add_filter( 'plugins_api', array(&$this, 'plugin_api_call'), 10, 3 );
31
+
32
+ // This is for testing only!
33
+ //set_site_transient( 'update_plugins', null );
34
+
35
+ // Show which variables are being requested when query plugin API
36
+ //add_filter( 'plugins_api_result', array(&$this, 'debug_result'), 10, 3 );
37
+ }
38
+
39
+ function check_for_update( $transient ) {
40
+ if(empty($transient->checked)) return $transient;
41
+
42
+ $request_args = array(
43
+ 'id' => $this->plugin_id,
44
+ 'slug' => $this->plugin_slug,
45
+ 'version' => $transient->checked[$this->plugin_path]
46
+ );
47
+ if ($this->license_key) $request_args['license'] = $this->license_key;
48
+
49
+ $request_string = $this->prepare_request( 'update_check', $request_args );
50
+ $raw_response = wp_remote_post( $this->api_url, $request_string );
51
+
52
+ $response = null;
53
+ if( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) )
54
+ $response = unserialize($raw_response['body']);
55
+
56
+ if( is_object($response) && !empty($response) ) {
57
+ // Feed the update data into WP updater
58
+ $transient->response[$this->plugin_path] = $response;
59
+ return $transient;
60
+ }
61
+
62
+ // Check to make sure there is not a similarly named plugin in the wordpress.org repository
63
+ if ( isset( $transient->response[$this->plugin_path] ) ) {
64
+ if ( strpos( $transient->response[$this->plugin_path]->package, 'wordpress.org' ) !== false ) {
65
+ unset($transient->response[$this->plugin_path]);
66
+ }
67
+ }
68
+
69
+ return $transient;
70
+ }
71
+
72
+ function plugin_api_call( $def, $action, $args ) {
73
+ if( !isset($args->slug) || $args->slug != $this->plugin_slug ) return $def;
74
+
75
+ $plugin_info = get_site_transient('update_plugins');
76
+ $request_args = array(
77
+ 'id' => $this->plugin_id,
78
+ 'slug' => $this->plugin_slug,
79
+ 'version' => (isset($plugin_info->checked)) ? $plugin_info->checked[$this->plugin_path] : 0 // Current version
80
+ );
81
+ if ($this->license_key) $request_args['license'] = $this->license_key;
82
+
83
+ $request_string = $this->prepare_request( $action, $request_args );
84
+ $raw_response = wp_remote_post( $this->api_url, $request_string );
85
+
86
+ if( is_wp_error($raw_response) ){
87
+ $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $raw_response->get_error_message());
88
+ } else {
89
+ $res = unserialize($raw_response['body']);
90
+ if ($res === false)
91
+ $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $raw_response['body']);
92
+ }
93
+
94
+ return $res;
95
+ }
96
+
97
+ function prepare_request( $action, $args ) {
98
+ global $wp_version;
99
+
100
+ return array(
101
+ 'body' => array(
102
+ 'action' => $action,
103
+ 'request' => serialize($args),
104
+ 'api-key' => md5(home_url())
105
+ ),
106
+ 'user-agent' => 'WordPress/'. $wp_version .'; '. home_url()
107
+ );
108
+ }
109
+
110
+ function debug_result( $res, $action, $args ) {
111
+ echo '<pre>'.print_r($res,true).'</pre>';
112
+ return $res;
113
+ }
114
+
115
+ }
116
+ }