Version Description
May 8, 2015 =
Fixed bug with some options getting reset to defaults after an upgrade.
Download this release
Release Info
Developer | pderksen |
Plugin | Pinterest "Pin It" Button |
Version | 2.1.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.0.1
- class-pinterest-pin-it-button.php +9 -1
- includes/register-settings.php +7 -3
- includes/upgrade-plugin.php +1 -1
- pinterest-pin-it-button.php +1 -1
- readme.txt +5 -1
- uninstall.php +1 -0
class-pinterest-pin-it-button.php
CHANGED
@@ -28,7 +28,7 @@ class Pinterest_Pin_It_Button {
|
|
28 |
* and README.txt changelog
|
29 |
**************************************/
|
30 |
|
31 |
-
protected $version = '2.1.0';
|
32 |
|
33 |
/**
|
34 |
* Unique identifier for your plugin.
|
@@ -81,6 +81,12 @@ class Pinterest_Pin_It_Button {
|
|
81 |
|
82 |
$old = get_option( 'pib_version' );
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if( version_compare( $old, $this->version, '<' ) ) {
|
85 |
delete_option( 'pib_upgrade_has_run' );
|
86 |
}
|
@@ -259,6 +265,8 @@ class Pinterest_Pin_It_Button {
|
|
259 |
|
260 |
// Load global options settings.
|
261 |
$pib_options = pib_get_settings();
|
|
|
|
|
262 |
|
263 |
// Include widgets file if on widgets admin or public.
|
264 |
include_once( dirname( __FILE__ ) . '/includes/widgets.php' );
|
28 |
* and README.txt changelog
|
29 |
**************************************/
|
30 |
|
31 |
+
protected $version = '2.1.0.1';
|
32 |
|
33 |
/**
|
34 |
* Unique identifier for your plugin.
|
81 |
|
82 |
$old = get_option( 'pib_version' );
|
83 |
|
84 |
+
// If $old exists then we know this plugin has been run already so we just update this here to
|
85 |
+
// avoid complications from this point forward (5/6/2015)
|
86 |
+
if ( ! ( false === $old ) ) {
|
87 |
+
update_option( 'pib_has_run', 1 );
|
88 |
+
}
|
89 |
+
|
90 |
if( version_compare( $old, $this->version, '<' ) ) {
|
91 |
delete_option( 'pib_upgrade_has_run' );
|
92 |
}
|
265 |
|
266 |
// Load global options settings.
|
267 |
$pib_options = pib_get_settings();
|
268 |
+
|
269 |
+
|
270 |
|
271 |
// Include widgets file if on widgets admin or public.
|
272 |
include_once( dirname( __FILE__ ) . '/includes/widgets.php' );
|
includes/register-settings.php
CHANGED
@@ -517,7 +517,7 @@ function pib_missing_callback( $args ) {
|
|
517 |
function pib_get_settings() {
|
518 |
|
519 |
// If this is the first time running we need to set the defaults
|
520 |
-
if (
|
521 |
|
522 |
// set default post visibility options
|
523 |
$post_visibility = get_option( 'pib_settings_post_visibility' );
|
@@ -532,12 +532,16 @@ function pib_get_settings() {
|
|
532 |
$general['button_type'] = 'user_selects_image';
|
533 |
$general['count_layout'] = 'none';
|
534 |
$general['uninstall_save_settings'] = 1;
|
535 |
-
$general['always_enqueue'] = 1;
|
536 |
|
537 |
update_option( 'pib_settings_general', $general );
|
|
|
|
|
|
|
|
|
|
|
538 |
|
539 |
// add an option to let us know the initial settings have been run and we don't run them again
|
540 |
-
add_option( '
|
541 |
}
|
542 |
|
543 |
$general_settings = is_array( get_option( 'pib_settings_general' ) ) ? get_option( 'pib_settings_general' ) : array();
|
517 |
function pib_get_settings() {
|
518 |
|
519 |
// If this is the first time running we need to set the defaults
|
520 |
+
if ( false === get_option( 'pib_has_run' ) ) {
|
521 |
|
522 |
// set default post visibility options
|
523 |
$post_visibility = get_option( 'pib_settings_post_visibility' );
|
532 |
$general['button_type'] = 'user_selects_image';
|
533 |
$general['count_layout'] = 'none';
|
534 |
$general['uninstall_save_settings'] = 1;
|
|
|
535 |
|
536 |
update_option( 'pib_settings_general', $general );
|
537 |
+
|
538 |
+
$advanced = get_option( 'pib_settings_advanced' );
|
539 |
+
$advanced['always_enqueue'] = 1;
|
540 |
+
|
541 |
+
update_option( 'pib_settings_advanced', $advanced );
|
542 |
|
543 |
// add an option to let us know the initial settings have been run and we don't run them again
|
544 |
+
add_option( 'pib_has_run', 1 );
|
545 |
}
|
546 |
|
547 |
$general_settings = is_array( get_option( 'pib_settings_general' ) ) ? get_option( 'pib_settings_general' ) : array();
|
includes/upgrade-plugin.php
CHANGED
@@ -59,7 +59,7 @@ function pib_v209_upgrade() {
|
|
59 |
|
60 |
$advanced_options['always_enqueue'] = 1;
|
61 |
|
62 |
-
update_option( '
|
63 |
|
64 |
}
|
65 |
pib_do_all_upgrades();
|
59 |
|
60 |
$advanced_options['always_enqueue'] = 1;
|
61 |
|
62 |
+
update_option( 'pib_settings_advanced', $advanced_options );
|
63 |
|
64 |
}
|
65 |
pib_do_all_upgrades();
|
pinterest-pin-it-button.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* Plugin Name: Pinterest "Pin It" Button Lite
|
14 |
* Plugin URI: http://pinplugins.com/pin-it-button-pro/
|
15 |
* Description: Add a Pinterest "Pin It" Button to your site and get your visitors to start pinning your awesome content!
|
16 |
-
* Version: 2.1.0
|
17 |
* Author: Phil Derksen
|
18 |
* Author URI: http://philderksen.com
|
19 |
* License: GPL-2.0+
|
13 |
* Plugin Name: Pinterest "Pin It" Button Lite
|
14 |
* Plugin URI: http://pinplugins.com/pin-it-button-pro/
|
15 |
* Description: Add a Pinterest "Pin It" Button to your site and get your visitors to start pinning your awesome content!
|
16 |
+
* Version: 2.1.0.1
|
17 |
* Author: Phil Derksen
|
18 |
* Author URI: http://philderksen.com
|
19 |
* License: GPL-2.0+
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: pderksen, nickyoung87
|
|
3 |
Tags: pinterest, pin it button, social, social media, image, images, photo, photos, pinterest pin it button, pin it, social button
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.2
|
6 |
-
Stable tag: 2.1.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -122,6 +122,10 @@ CSS styling and shortcode help available within the plugin admin.
|
|
122 |
|
123 |
== Changelog ==
|
124 |
|
|
|
|
|
|
|
|
|
125 |
= 2.1.0 - May 4, 2015 =
|
126 |
|
127 |
* Fixed plugin CSS not getting enqueued in some cases.
|
3 |
Tags: pinterest, pin it button, social, social media, image, images, photo, photos, pinterest pin it button, pin it, social button
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.2
|
6 |
+
Stable tag: 2.1.0.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
122 |
|
123 |
== Changelog ==
|
124 |
|
125 |
+
= 2.1.0.1 - May 8, 2015 =
|
126 |
+
|
127 |
+
* Fixed bug with some options getting reset to defaults after an upgrade.
|
128 |
+
|
129 |
= 2.1.0 - May 4, 2015 =
|
130 |
|
131 |
* Fixed plugin CSS not getting enqueued in some cases.
|
uninstall.php
CHANGED
@@ -28,6 +28,7 @@ if ( ! empty( $general['uninstall_save_settings'] ) ) {
|
|
28 |
delete_option( 'pib_settings_styles' );
|
29 |
delete_option( 'pib_settings_misc' );
|
30 |
delete_option( 'pib_upgrade_has_run' );
|
|
|
31 |
delete_option( 'pib_version' );
|
32 |
delete_option( 'pib_show_admin_install_notice' );
|
33 |
delete_option( 'pib_settings_advanced' );
|
28 |
delete_option( 'pib_settings_styles' );
|
29 |
delete_option( 'pib_settings_misc' );
|
30 |
delete_option( 'pib_upgrade_has_run' );
|
31 |
+
delete_option( 'pib_has_run' );
|
32 |
delete_option( 'pib_version' );
|
33 |
delete_option( 'pib_show_admin_install_notice' );
|
34 |
delete_option( 'pib_settings_advanced' );
|