Kiwi Social Share – Social Media Share Buttons & Icons - Version 2.0.13

Version Description

  • Fixed "Trying to get property post_content when there is no id, like 404"
Download this release

Release Info

Developer machothemes
Plugin Icon wp plugin Kiwi Social Share – Social Media Share Buttons & Icons
Version 2.0.13
Comparing to
See all releases

Code changes from version 2.0.11 to 2.0.13

includes/lib/class-kiwi-social-share-shortcodes.php CHANGED
@@ -103,7 +103,7 @@ class Kiwi_Social_Share_Shortcodes {
103
 
104
  $id = '';
105
  if ( ! empty( $_GET ) && ! empty( $_GET['post'] ) ) {
106
- $id = $_GET['post'];
107
  /**
108
  * Add shortcode fields
109
  *
103
 
104
  $id = '';
105
  if ( ! empty( $_GET ) && ! empty( $_GET['post'] ) ) {
106
+ $id = absint( $_GET['post'] );
107
  /**
108
  * Add shortcode fields
109
  *
includes/lib/helpers/class-kiwi-social-share-helper.php CHANGED
@@ -369,7 +369,7 @@ class Kiwi_Social_Share_Helper {
369
  */
370
  public static function get_excerpt_by_id( $id ) {
371
  $the_post = get_post( $id );
372
- if ( NULL !== $the_post ) {
373
  return '';
374
  }
375
 
@@ -432,8 +432,13 @@ function kiwi_social_share_get_option() {
432
  wp_die( 'Forbidden' );
433
  }
434
 
 
 
 
 
435
  if ( ! empty( $_POST ) && $_POST['action'] === 'kiwi_social_share_get_option' ) {
436
- wp_die( json_encode( Kiwi_Social_Share_Helper::get_setting_value( $_POST['args']['option'], $_POST['args']['default'], $_POST['args']['group'] ) ) );
 
437
  }
438
 
439
  wp_die( 'Forbidden' );
@@ -453,9 +458,14 @@ function kiwi_social_share_set_option() {
453
  }
454
 
455
  if ( ! empty( $_POST ) && $_POST['action'] === 'kiwi_social_share_set_option' ) {
456
- $option = get_option( $_POST['args']['group'] );
457
- $option[ $_POST['args']['option'] ] = $_POST['args']['value'];
458
- update_option( $_POST['args']['group'], $option );
 
 
 
 
 
459
  wp_die( 'Success' );
460
  }
461
 
369
  */
370
  public static function get_excerpt_by_id( $id ) {
371
  $the_post = get_post( $id );
372
+ if ( NULL === $the_post ) {
373
  return '';
374
  }
375
 
432
  wp_die( 'Forbidden' );
433
  }
434
 
435
+ $option = sanitize_text_field( $_POST['args']['option'] );
436
+ $default = sanitize_text_field( $_POST['args']['default'] );
437
+ $group = sanitize_text_field( $_POST['args']['group'] );
438
+
439
  if ( ! empty( $_POST ) && $_POST['action'] === 'kiwi_social_share_get_option' ) {
440
+ $value = Kiwi_Social_Share_Helper::get_setting_value( $option, $default, $group );
441
+ wp_die( json_encode( esc_html( $value ) ) );
442
  }
443
 
444
  wp_die( 'Forbidden' );
458
  }
459
 
460
  if ( ! empty( $_POST ) && $_POST['action'] === 'kiwi_social_share_set_option' ) {
461
+
462
+ $group = sanitize_text_field( $_POST['args']['group'] );
463
+ $key = sanitize_text_field( $_POST['args']['option'] );
464
+ $value = sanitize_text_field( $_POST['args']['value'] );
465
+
466
+ $option = get_option( $group );
467
+ $option[ $key ] = $value;
468
+ update_option( $group, $option );
469
  wp_die( 'Success' );
470
  }
471
 
kiwi-social-share.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Kiwi Social Share - Social Media Share Buttons & Icons
4
- * Version: 2.0.11
5
  * Plugin URI: https://www.machothemes.com/kiwi-social-share
6
  * Description: Really beautiful & simple social media & share buttons + icons. Simplicity & speed is key with this social media share plugin.
7
  * Author: Macho Themes
@@ -38,7 +38,7 @@ require_once 'includes/class-kiwi-social-share-autoloader.php';
38
  * @return object Kiwi_Social_Share
39
  */
40
  function Kiwi_Social_Share() {
41
- $instance = Kiwi_Social_Share::instance( __FILE__, '2.0.11' );
42
 
43
  if ( is_null( $instance->settings ) ) {
44
  $instance->settings = Kiwi_Social_Share_Settings::instance( $instance );
1
  <?php
2
  /*
3
  * Plugin Name: Kiwi Social Share - Social Media Share Buttons & Icons
4
+ * Version: 2.0.13
5
  * Plugin URI: https://www.machothemes.com/kiwi-social-share
6
  * Description: Really beautiful & simple social media & share buttons + icons. Simplicity & speed is key with this social media share plugin.
7
  * Author: Macho Themes
38
  * @return object Kiwi_Social_Share
39
  */
40
  function Kiwi_Social_Share() {
41
+ $instance = Kiwi_Social_Share::instance( __FILE__, '2.0.13' );
42
 
43
  if ( is_null( $instance->settings ) ) {
44
  $instance->settings = Kiwi_Social_Share_Settings::instance( $instance );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: machothemes, silkalns
4
  Tags: social media button, social share button, social floating bar, social share bar, facebook share, social sharing icons, twitter share, woocommerce sharing, share buttons, pinterest share, google plus share, social share counters
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 2.0.11
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -76,6 +76,9 @@ Floating Bar Filters
76
 
77
  == Changelog ==
78
 
 
 
 
79
  = 2.0.11 =
80
  * Improve performance
81
  * Fixed security issue
4
  Tags: social media button, social share button, social floating bar, social share bar, facebook share, social sharing icons, twitter share, woocommerce sharing, share buttons, pinterest share, google plus share, social share counters
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 2.0.13
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
76
 
77
  == Changelog ==
78
 
79
+ = 2.0.13 =
80
+ * Fixed "Trying to get property ‘post_content’ when there is no id, like 404"
81
+
82
  = 2.0.11 =
83
  * Improve performance
84
  * Fixed security issue