Easy Digital Downloads - Version 2.6.17

Version Description

Download this release

Release Info

Developer mordauk
Plugin Icon 128x128 Easy Digital Downloads
Version 2.6.17
Comparing to
See all releases

Code changes from version 2.6.16 to 2.6.17

easy-digital-downloads.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
- * Version: 2.6.16
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
@@ -25,7 +25,7 @@
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
- * @version 2.6.16
29
  */
30
 
31
  // Exit if accessed directly.
@@ -196,7 +196,7 @@ final class Easy_Digital_Downloads {
196
 
197
  // Plugin version.
198
  if ( ! defined( 'EDD_VERSION' ) ) {
199
- define( 'EDD_VERSION', '2.6.16' );
200
  }
201
 
202
  // Plugin Folder Path.
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Easy Digital Downloads
7
  * Author URI: https://easydigitaldownloads.com
8
+ * Version: 2.6.17
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.6.17
29
  */
30
 
31
  // Exit if accessed directly.
196
 
197
  // Plugin version.
198
  if ( ! defined( 'EDD_VERSION' ) ) {
199
+ define( 'EDD_VERSION', '2.6.17' );
200
  }
201
 
202
  // Plugin Folder Path.
includes/EDD_SL_Plugin_Updater.php CHANGED
@@ -1,16 +1,13 @@
1
  <?php
2
 
3
- // uncomment this line for testing
4
- //set_site_transient( 'update_plugins', null );
5
-
6
  // Exit if accessed directly
7
  if ( ! defined( 'ABSPATH' ) ) exit;
8
 
9
  /**
10
  * Allows plugins to use their own update API.
11
  *
12
- * @author Pippin Williamson
13
- * @version 1.6.7
14
  */
15
  class EDD_SL_Plugin_Updater {
16
 
@@ -61,9 +58,9 @@ class EDD_SL_Plugin_Updater {
61
  */
62
  public function init() {
63
 
64
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
65
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
66
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
67
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
68
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
69
 
@@ -101,7 +98,7 @@ class EDD_SL_Plugin_Updater {
101
  $version_info = $this->get_cached_version_info();
102
 
103
  if ( false === $version_info ) {
104
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
105
 
106
  $this->set_version_info_cache( $version_info );
107
 
@@ -115,7 +112,7 @@ class EDD_SL_Plugin_Updater {
115
 
116
  }
117
 
118
- $_transient_data->last_checked = time();
119
  $_transient_data->checked[ $this->name ] = $this->version;
120
 
121
  }
@@ -159,7 +156,7 @@ class EDD_SL_Plugin_Updater {
159
  $version_info = $this->get_cached_version_info();
160
 
161
  if ( false === $version_info ) {
162
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
163
 
164
  $this->set_version_info_cache( $version_info );
165
  }
@@ -174,7 +171,7 @@ class EDD_SL_Plugin_Updater {
174
 
175
  }
176
 
177
- $update_cache->last_checked = time();
178
  $update_cache->checked[ $this->name ] = $this->version;
179
 
180
  set_site_transient( 'update_plugins', $update_cache );
@@ -253,7 +250,7 @@ class EDD_SL_Plugin_Updater {
253
  'slug' => $this->slug,
254
  'is_ssl' => is_ssl(),
255
  'fields' => array(
256
- 'banners' => false, // These will be supported soon hopefully
257
  'reviews' => false
258
  )
259
  );
@@ -275,6 +272,8 @@ class EDD_SL_Plugin_Updater {
275
  $_data = $api_response;
276
  }
277
 
 
 
278
  }
279
 
280
  return $_data;
@@ -328,7 +327,7 @@ class EDD_SL_Plugin_Updater {
328
  'slug' => $data['slug'],
329
  'author' => $data['author'],
330
  'url' => home_url(),
331
- 'beta' => isset( $data['beta'] ) ? $data['beta'] : false,
332
  );
333
 
334
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -343,6 +342,10 @@ class EDD_SL_Plugin_Updater {
343
  $request = false;
344
  }
345
 
 
 
 
 
346
  return $request;
347
  }
348
 
@@ -378,7 +381,8 @@ class EDD_SL_Plugin_Updater {
378
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
379
  'slug' => $_REQUEST['slug'],
380
  'author' => $data['author'],
381
- 'url' => home_url()
 
382
  );
383
 
384
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -435,4 +439,4 @@ class EDD_SL_Plugin_Updater {
435
 
436
  }
437
 
438
- }
1
  <?php
2
 
 
 
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) exit;
5
 
6
  /**
7
  * Allows plugins to use their own update API.
8
  *
9
+ * @author Easy Digital Downloads
10
+ * @version 1.6.8
11
  */
12
  class EDD_SL_Plugin_Updater {
13
 
58
  */
59
  public function init() {
60
 
61
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
+ remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
64
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
 
98
  $version_info = $this->get_cached_version_info();
99
 
100
  if ( false === $version_info ) {
101
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
102
 
103
  $this->set_version_info_cache( $version_info );
104
 
112
 
113
  }
114
 
115
+ $_transient_data->last_checked = current_time( 'timestamp' );
116
  $_transient_data->checked[ $this->name ] = $this->version;
117
 
118
  }
156
  $version_info = $this->get_cached_version_info();
157
 
158
  if ( false === $version_info ) {
159
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
160
 
161
  $this->set_version_info_cache( $version_info );
162
  }
171
 
172
  }
173
 
174
+ $update_cache->last_checked = current_time( 'timestamp' );
175
  $update_cache->checked[ $this->name ] = $this->version;
176
 
177
  set_site_transient( 'update_plugins', $update_cache );
250
  'slug' => $this->slug,
251
  'is_ssl' => is_ssl(),
252
  'fields' => array(
253
+ 'banners' => array(),
254
  'reviews' => false
255
  )
256
  );
272
  $_data = $api_response;
273
  }
274
 
275
+ } else {
276
+ $_data = $edd_api_request_transient;
277
  }
278
 
279
  return $_data;
327
  'slug' => $data['slug'],
328
  'author' => $data['author'],
329
  'url' => home_url(),
330
+ 'beta' => ! empty( $data['beta'] ),
331
  );
332
 
333
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
342
  $request = false;
343
  }
344
 
345
+ if ( $request && isset( $request->banners ) ) {
346
+ $request->banners = maybe_unserialize( $request->banners );
347
+ }
348
+
349
  return $request;
350
  }
351
 
381
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
382
  'slug' => $_REQUEST['slug'],
383
  'author' => $data['author'],
384
+ 'url' => home_url(),
385
+ 'beta' => ! empty( $data['beta'] )
386
  );
387
 
388
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
439
 
440
  }
441
 
442
+ }
includes/admin/tools.php CHANGED
@@ -281,7 +281,7 @@ function edd_tools_betas_display() {
281
  <?php $checked = edd_extension_has_beta_support( $slug ); ?>
282
  <th scope="row"><?php echo esc_html( $product ); ?></th>
283
  <td>
284
- <input type="checkbox" name="enabled_betas[<?php echo esc_attr( $slug ); ?>]" id="enabled_betas[<?php echo esc_attr( $slug ); ?>]"<?php echo $checked; ?> value="1" />
285
  <label for="enabled_betas[<?php echo esc_attr( $slug ); ?>]"><?php printf( __( 'Get updates for pre-release versions of %s', 'easy-digital-downloads' ), $product ); ?></label>
286
  </td>
287
  </tr>
281
  <?php $checked = edd_extension_has_beta_support( $slug ); ?>
282
  <th scope="row"><?php echo esc_html( $product ); ?></th>
283
  <td>
284
+ <input type="checkbox" name="enabled_betas[<?php echo esc_attr( $slug ); ?>]" id="enabled_betas[<?php echo esc_attr( $slug ); ?>]"<?php echo checked( $checked, true, false ); ?> value="1" />
285
  <label for="enabled_betas[<?php echo esc_attr( $slug ); ?>]"><?php printf( __( 'Get updates for pre-release versions of %s', 'easy-digital-downloads' ), $product ); ?></label>
286
  </td>
287
  </tr>
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://easydigitaldownloads.com/donate/
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
  Tested up to: 4.8
9
- Stable Tag: 2.6.16
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
@@ -187,6 +187,10 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
187
 
188
  == Changelog ==
189
 
 
 
 
 
190
  = 2.6.16, December 21, 2016 =
191
  * Fix: 404 errors when downloading some files
192
 
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
  Tested up to: 4.8
9
+ Stable Tag: 2.6.17
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
187
 
188
  == Changelog ==
189
 
190
+ = 2.6.17, December 28, 2016 =
191
+ * Fix: Checkboxes in Downloads > Tools > Beta Versions do not retain checked state
192
+ * Fix: Extension update notifications do not show up
193
+
194
  = 2.6.16, December 21, 2016 =
195
  * Fix: 404 errors when downloading some files
196