Genesis Simple Share - Version 1.0.2

Version Description

  • Fix error where icons do not show in archives when showing the excerpt
Download this release

Release Info

Developer Nick_theGeek
Plugin Icon 128x128 Genesis Simple Share
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

Files changed (3) hide show
  1. lib/front-end.php +6 -5
  2. plugin.php +1 -1
  3. readme.txt +4 -1
lib/front-end.php CHANGED
@@ -28,6 +28,7 @@ class Gensis_Simple_Share_Front_End {
28
  var $appearance;
29
  var $size;
30
  var $archive;
 
31
  var $locations = array();
32
 
33
  /**
@@ -318,8 +319,8 @@ class Gensis_Simple_Share_Front_End {
318
  return;
319
  }
320
 
321
- if( in_array( $location . '-' . get_the_ID(), $this->locations ) ){
322
- return '<!-- Genesis Simple Share error: This location has already been used. -->';
323
  }
324
 
325
  if( empty( $icons ) ||
@@ -348,7 +349,7 @@ class Gensis_Simple_Share_Front_End {
348
 
349
  $shares[] = $icon .': true';
350
 
351
- $div_id = strtolower( $icon .'-'. $location .'-'. $id );
352
 
353
  $image = ( $image = genesis_get_image( array( 'format' => 'url', 'size' => 'full' ) ) ) ? $image : $this->get_first_image();
354
 
@@ -436,7 +437,7 @@ class Gensis_Simple_Share_Front_End {
436
 
437
  $divs = implode( '', $buttons );
438
 
439
- $div_id = 'share-'. $location .'-' . $id;
440
 
441
  $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s">%s</div>',
442
  $location,
@@ -453,7 +454,7 @@ class Gensis_Simple_Share_Front_End {
453
  });
454
  </script>";
455
 
456
- $this->locations[] = $location . '-' . get_the_ID();
457
 
458
  return $div . $script;
459
 
28
  var $appearance;
29
  var $size;
30
  var $archive;
31
+ var $location_count;
32
  var $locations = array();
33
 
34
  /**
319
  return;
320
  }
321
 
322
+ if( in_array( $location . $this->location_count . '-' . get_the_ID(), $this->locations ) ){
323
+ $this->location_count = $this->location_count ? $this->location_count++ : 2;
324
  }
325
 
326
  if( empty( $icons ) ||
349
 
350
  $shares[] = $icon .': true';
351
 
352
+ $div_id = strtolower( $icon .'-'. $location . $this->location_count .'-'. $id );
353
 
354
  $image = ( $image = genesis_get_image( array( 'format' => 'url', 'size' => 'full' ) ) ) ? $image : $this->get_first_image();
355
 
437
 
438
  $divs = implode( '', $buttons );
439
 
440
+ $div_id = 'share-'. $location . $this->location_count .'-' . $id;
441
 
442
  $div = sprintf( '<div class="share-%s share-%s share-%s" id="%s">%s</div>',
443
  $location,
454
  });
455
  </script>";
456
 
457
+ $this->locations[] = $location . $this->location_count . '-' . get_the_ID();
458
 
459
  return $div . $script;
460
 
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Genesis Simple Share
4
  Plugin URI:
5
  Description: A simple sharing plugin using the Share script.
6
- Version: 1.0.1
7
  Author: copyblogger
8
  Author URI: http://www.copyblogger.com
9
  Text Domain: genesis-simple-share
3
  Plugin Name: Genesis Simple Share
4
  Plugin URI:
5
  Description: A simple sharing plugin using the Share script.
6
+ Version: 1.0.2
7
  Author: copyblogger
8
  Author URI: http://www.copyblogger.com
9
  Text Domain: genesis-simple-share
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: nathanrice, studiopress, wpmuguru, nick_thegeek, bgardner
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
  Tested up to: 4.1
6
- Stable tag: 1.0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -31,6 +31,9 @@ https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips
31
 
32
  == Changelog ==
33
 
 
 
 
34
  = 1.0.1 =
35
  * Fixes potential error where only first post in archive will show share buttons
36
 
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
  Tested up to: 4.1
6
+ Stable tag: 1.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.0.2 =
35
+ * Fix error where icons do not show in archives when showing the excerpt
36
+
37
  = 1.0.1 =
38
  * Fixes potential error where only first post in archive will show share buttons
39