jQuery Pin It Button for Images - Version 2.2.4

Version Description

  • Released 2017-01-30
  • Fix to support old versions of PHP
Download this release

Release Info

Developer mrsztuczkens
Plugin Icon wp plugin jQuery Pin It Button for Images
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.2.3 to 2.2.4

includes/admin/settings/jpibfi-import-export-settings.php CHANGED
@@ -121,12 +121,13 @@ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
121
  header( 'Content-Disposition: attachment; filename=' . $filename );
122
  header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
123
 
124
- $export_options = array_reduce($this->options_to_import_export, function($return, $current) {
125
- $option_value = get_option( $current );
126
- return false !== $option_value
127
- ? array_merge( $return, array( $current => maybe_serialize( $option_value ) ) )
128
- : $return;
129
- }, array() );
 
130
 
131
  $JSON_PRETTY_PRINT = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
132
  echo json_encode( array( 'options' => $export_options ), $JSON_PRETTY_PRINT );
121
  header( 'Content-Disposition: attachment; filename=' . $filename );
122
  header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
123
 
124
+ $export_options = array();
125
+ foreach ( $this->options_to_import_export as $option_name ) {
126
+ $option_value = get_option( $option_name );
127
+ if (false !== $option_value ) {
128
+ $export_options[ $option_name ] = maybe_serialize( $option_value );
129
+ }
130
+ }
131
 
132
  $JSON_PRETTY_PRINT = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
133
  echo json_encode( array( 'options' => $export_options ), $JSON_PRETTY_PRINT );
includes/includes/versions/JPIBFI_Version_Update_2_2_3.php CHANGED
@@ -15,10 +15,10 @@ class JPIBFI_Version_Update_2_2_3 {
15
  $options = new JPIBFI_Selection_Options();
16
  $defaults = $options->get_default_options();
17
  $with_defaults = array_merge( $defaults, $options_val );
18
- $keys = array_keys( $defaults );
19
- $result = array_reduce( $keys, function ( $result, $current_key ) use ( $with_defaults ) {
20
- return array_merge( $result, array( $current_key => $with_defaults[ $current_key ] ) );
21
- }, array() );
22
  $options->update( $result );
23
  }
24
 
@@ -28,10 +28,10 @@ class JPIBFI_Version_Update_2_2_3 {
28
  $options = new JPIBFI_Visual_Options();
29
  $defaults = $options->get_default_options();
30
  $with_defaults = array_merge( $defaults, $options_val );
31
- $keys = array_keys( $defaults );
32
- $result = array_reduce( $keys, function ( $result, $current_key ) use ( $with_defaults ) {
33
- return array_merge( $result, array( $current_key => $with_defaults[ $current_key ] ) );
34
- }, array() );
35
  $options->update( $result );
36
  }
37
  }
15
  $options = new JPIBFI_Selection_Options();
16
  $defaults = $options->get_default_options();
17
  $with_defaults = array_merge( $defaults, $options_val );
18
+ $result = array();
19
+ foreach($defaults as $key => $val) {
20
+ $result[ $key ] = $with_defaults[ $key ];
21
+ }
22
  $options->update( $result );
23
  }
24
 
28
  $options = new JPIBFI_Visual_Options();
29
  $defaults = $options->get_default_options();
30
  $with_defaults = array_merge( $defaults, $options_val );
31
+ $result = array();
32
+ foreach($defaults as $key => $val) {
33
+ $result[ $key ] = $with_defaults[ $key ];
34
+ }
35
  $options->update( $result );
36
  }
37
  }
jquery-pin-it-button-for-images.php CHANGED
@@ -6,7 +6,7 @@ Description: Highlights images on hover and adds a "Pin It" button over them for
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
- Version:2.2.3
10
  Author URI: https://highfiveplugins.com/
11
  */
12
 
@@ -18,7 +18,7 @@ if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
- $version = '2.2.3';
22
  require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
+ Version:2.2.4
10
  Author URI: https://highfiveplugins.com/
11
  */
12
 
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
+ $version = '2.2.4';
22
  require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mrsztuczkens, redearthdesign, brocheafoin, robertark
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
- Stable tag: 2.2.3
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
@@ -68,6 +68,10 @@ Please report them in the plugin's support forum on Wordpress.org.
68
 
69
  == Changelog ==
70
 
 
 
 
 
71
  = 2.2.3 =
72
  * Released 2017-01-29
73
  * Minor cleanup
@@ -296,6 +300,9 @@ Please report them in the plugin's support forum on Wordpress.org.
296
 
297
  == Upgrade Notice ==
298
 
 
 
 
299
  = 2.2.3 =
300
  * Code cleanup * enhancements to using settings
301
 
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
+ Stable tag: 2.2.4
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
68
 
69
  == Changelog ==
70
 
71
+ = 2.2.4 =
72
+ * Released 2017-01-30
73
+ * Fix to support old versions of PHP
74
+
75
  = 2.2.3 =
76
  * Released 2017-01-29
77
  * Minor cleanup
300
 
301
  == Upgrade Notice ==
302
 
303
+ = 2.2.4 =
304
+ * Fix to support old versions of PHP
305
+
306
  = 2.2.3 =
307
  * Code cleanup * enhancements to using settings
308