Premium Addons for Elementor - Version 2.0.6

Version Description

  • Fixed: Plugin row meta data bug.
  • Fixed: Plugin update issue.
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
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: 2.0.5
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -98,7 +98,6 @@ define( 'PREMIUM_ADDONS_FILE', __FILE__ );
98
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
99
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
100
  add_action( 'elementor/frontend/before_register_scripts', array($this, 'premium_addons_register_scripts'));
101
- add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 2 );
102
  }
103
 
104
  /**
@@ -240,20 +239,4 @@ define( 'PREMIUM_ADDONS_FILE', __FILE__ );
240
  1
241
  );
242
  }
243
- function plugin_row_meta( $plugin_meta, $plugin_file ) {
244
- $row_meta = [
245
- 'docs' => '<a href="http://premiumaddons.com/" title="' . esc_attr( __( 'Visit Plugin Site', 'premium-addons-for-elementor' ) ) . '" target="_blank">' . __( 'Visit Plugin Site', 'premium-addons-for-elementor' ) . '</a>',
246
- ];
247
-
248
- $plugin_meta = array_merge( $plugin_meta, $row_meta );
249
-
250
-
251
- return $plugin_meta;
252
- }
253
- }
254
- require_once('wp-updates-plugin.php');
255
- new WPUpdatesPluginUpdater_1837( 'http://wp-updates.com/api/2/plugin', plugin_basename(__FILE__));
256
- /**
257
- * @since 1.1.4
258
- * @access public
259
- */
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: 2.0.6
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
98
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
99
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
100
  add_action( 'elementor/frontend/before_register_scripts', array($this, 'premium_addons_register_scripts'));
 
101
  }
102
 
103
  /**
239
  1
240
  );
241
  }
242
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -79,6 +79,11 @@ Premium Addons for Elementor is light weight and we also gave you the control to
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
82
  = 2.0.5 =
83
 
84
  - Tweak: Added API Disable checkbox to Google Maps tab in plugin settings.
79
 
80
  == Changelog ==
81
 
82
+ = 2.0.6 =
83
+
84
+ - Fixed: Plugin row meta data bug.
85
+ - Fixed: Plugin update issue.
86
+
87
  = 2.0.5 =
88
 
89
  - Tweak: Added API Disable checkbox to Google Maps tab in plugin settings.
wp-updates-plugin.php DELETED
@@ -1,116 +0,0 @@
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
- }