Genesis Simple Share - Version trunk

Version Description

Download this release

Release Info

Developer studiopress
Plugin Icon 128x128 Genesis Simple Share
Version trunk
Comparing to
See all releases

Code changes from version 1.1.2 to trunk

assets/js/admin.min.js CHANGED
@@ -1,2 +1 @@
1
- jQuery(document).ready(function(e){e(".genesis_simple_share_general_size, .genesis_simple_share_general_appearance").change(function(){var s="share-"+e(".genesis_simple_share_general_size").val(),r="share-"+e(".genesis_simple_share_general_appearance").val();e("#share-preview-preview").removeClass(),e("#share-preview-preview").addClass("share-preview "+s+" "+r)}),e(".genesis_simple_share_general_disable_count").change(function(){e(this).prop("checked")?e(".share-preview .box").addClass("no-count"):e(".share-preview .sharrre:not(.twitter, .googlePlus ) .box").removeClass("no-count")}),setTimeout(function(){e(".genesis_simple_share_general_disable_count").prop("checked")?e(".share-preview .box").addClass("no-count"):e(".share-preview .sharrre:not(.twitter, .googlePlus ) .box").removeClass("no-count")},2e3)});
2
- //# sourceMappingURL=maps/admin.min.js.map
1
+ jQuery(document).ready(function(a){a(".genesis_simple_share_general_size, .genesis_simple_share_general_appearance").change(function(){var e="share-"+a(".genesis_simple_share_general_size").val(),s="share-"+a(".genesis_simple_share_general_appearance").val();a("#share-preview-preview").removeClass(),a("#share-preview-preview").addClass("share-preview "+e+" "+s)}),a(".genesis_simple_share_general_disable_count").change(function(){a(this).prop("checked")?a(".share-preview .box").addClass("no-count"):a(".share-preview .sharrre:not(.twitter, .googlePlus, .facebook ) .box").removeClass("no-count")}),setTimeout(function(){a(".genesis_simple_share_general_disable_count").prop("checked")?a(".share-preview .box").addClass("no-count"):a(".share-preview .sharrre:not(.twitter, .googlePlus, .facebook ) .box").removeClass("no-count")},2e3)});
 
composer.json CHANGED
@@ -10,9 +10,9 @@
10
  },
11
  "require-dev": {
12
  "php": "^5.6 || ^7",
13
- "dealerdirect/phpcodesniffer-composer-installer": "*",
14
- "squizlabs/php_codesniffer": "^3.3.1",
15
- "phpcompatibility/phpcompatibility-wp": "*",
16
  "wp-coding-standards/wpcs": "^1"
17
  },
18
  "config": {
@@ -22,8 +22,8 @@
22
  "prefer-stable": true,
23
  "scripts": {
24
  "phpcs": "phpcs --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./",
25
- "phpcs-compat": "phpcs --extensions=php --standard=PHPCompatibilityWP --ignore=vendor/,node_modules/,assets/ --runtime-set testVersion 5.6- -p ./",
26
- "phpcbf": "phpcbf --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./"
27
  },
28
  "support": {
29
  "issues": "https://github.com/studiopress/genesis-simple-share/issues",
10
  },
11
  "require-dev": {
12
  "php": "^5.6 || ^7",
13
+ "dealerdirect/phpcodesniffer-composer-installer": "*",
14
+ "squizlabs/php_codesniffer": "^3.3.1",
15
+ "phpcompatibility/phpcompatibility-wp": "*",
16
  "wp-coding-standards/wpcs": "^1"
17
  },
18
  "config": {
22
  "prefer-stable": true,
23
  "scripts": {
24
  "phpcs": "phpcs --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./",
25
+ "phpcs-compat": "phpcs --extensions=php --standard=PHPCompatibilityWP --ignore=vendor/,node_modules/,assets/ --runtime-set testVersion 5.6- -p ./",
26
+ "phpcbf": "phpcbf --standard=WordPress --ignore=vendor/,node_modules/,assets/ --extensions=php -p ./"
27
  },
28
  "support": {
29
  "issues": "https://github.com/studiopress/genesis-simple-share/issues",
includes/class-genesis-simple-share-boxes.php CHANGED
@@ -317,7 +317,7 @@ class Genesis_Simple_Share_Boxes extends Genesis_Admin_Boxes {
317
  <td>
318
  <?php
319
 
320
- require_once GENESIS_SIMPLE_SHARE_INC . 'class-gensis-simple-share-preview.php';
321
  genesis_share_icon_preview_output( 'preview' );
322
 
323
  ?>
317
  <td>
318
  <?php
319
 
320
+ require_once GENESIS_SIMPLE_SHARE_INC . 'class-genesis-simple-share-preview.php';
321
  genesis_share_icon_preview_output( 'preview' );
322
 
323
  ?>
includes/class-genesis-simple-share-front-end.php CHANGED
@@ -234,7 +234,8 @@ class Genesis_Simple_Share_Front_End {
234
 
235
  if ( 'before_content' === $position || 'both' === $position ) {
236
 
237
- echo wp_kses_post( $this->get_icon_output( 'before', $this->icons ) );
 
238
 
239
  }
240
 
@@ -260,7 +261,8 @@ class Genesis_Simple_Share_Front_End {
260
 
261
  if ( 'after_content' === $position || 'both' === $position ) {
262
 
263
- echo wp_kses_post( $this->get_icon_output( 'after', $this->icons ) );
 
264
 
265
  }
266
 
@@ -520,7 +522,8 @@ class Genesis_Simple_Share_Front_End {
520
  $button = ( 'twitter' === $icon && $via ) ? " twitter: { via: '" . str_replace( '@', '', $via ) . "' }" : '';
521
  $button = 'pinterest' === $icon && $image ? " pinterest: { media: '$image', description: '$description' }" : $button;
522
 
523
- $disable_count = genesis_get_option( 'general_disable_count', 'genesis_simple_share' ) ? 'disableCount: true,' : '';
 
524
 
525
  if ( $this->is_archive() ) {
526
 
@@ -814,6 +817,7 @@ function genesis_share_get_icon_output( $position, $icons = array(), $force_show
814
  */
815
  function genesis_share_icon_output( $position, $icons = array(), $force_show = false, $url = '' ) {
816
 
817
- echo wp_kses_post( genesis_share_get_icon_output( $position, $icons, $force_show, $url ) );
 
818
 
819
  }
234
 
235
  if ( 'before_content' === $position || 'both' === $position ) {
236
 
237
+ // phpcs:ignore
238
+ echo $this->get_icon_output( 'before', $this->icons );
239
 
240
  }
241
 
261
 
262
  if ( 'after_content' === $position || 'both' === $position ) {
263
 
264
+ // phpcs:ignore
265
+ echo $this->get_icon_output( 'after', $this->icons );
266
 
267
  }
268
 
522
  $button = ( 'twitter' === $icon && $via ) ? " twitter: { via: '" . str_replace( '@', '', $via ) . "' }" : '';
523
  $button = 'pinterest' === $icon && $image ? " pinterest: { media: '$image', description: '$description' }" : $button;
524
 
525
+ // Disable the counter if the option is set or is the Facebook.
526
+ $disable_count = genesis_get_option( 'general_disable_count', 'genesis_simple_share' ) || ( 'facebook' === $icon ) ? 'disableCount: true,' : '';
527
 
528
  if ( $this->is_archive() ) {
529
 
817
  */
818
  function genesis_share_icon_output( $position, $icons = array(), $force_show = false, $url = '' ) {
819
 
820
+ // phpcs:ignore
821
+ echo genesis_share_get_icon_output( $position, $icons, $force_show, $url );
822
 
823
  }
includes/{class-gensis-simple-share-preview.php → class-genesis-simple-share-preview.php} RENAMED
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  *
22
  * @since 0.1.0
23
  */
24
- class Gensis_Simple_Share_Preview {
25
 
26
  /**
27
  * Icons.
@@ -152,26 +152,31 @@ class Gensis_Simple_Share_Preview {
152
 
153
  $div_id = strtolower( $icon . '-' . $location . '-' . $id );
154
 
 
 
 
155
  // media.
156
  $button = '';
157
 
158
  $scripts .= sprintf(
159
  "$('#%s').sharrre({
160
- share: {
161
- %s: true
162
- },
163
- urlCurl: '%s',
164
- enableHover: false,
165
- enableTracking: true,
166
- buttons: { %s },
167
- click: function(api, options){
168
- api.simulateClick();
169
- api.openPopup('%s');
170
- }
171
- });\n",
 
172
  $div_id,
173
  $icon,
174
  GENESIS_SIMPLE_SHARE_URL . '/assets/js/sharrre/sharrre.php',
 
175
  $button,
176
  $icon
177
  );
@@ -297,7 +302,7 @@ class Gensis_Simple_Share_Preview {
297
  function genesis_simple_share_preview() {
298
  global $genesis_simple_share;
299
 
300
- $genesis_simple_share = new Gensis_Simple_Share_Preview();
301
 
302
  }
303
 
21
  *
22
  * @since 0.1.0
23
  */
24
+ class Genesis_Simple_Share_Preview {
25
 
26
  /**
27
  * Icons.
152
 
153
  $div_id = strtolower( $icon . '-' . $location . '-' . $id );
154
 
155
+ // Disable the counter if the option is set or is the Facebook.
156
+ $disable_count = genesis_get_option( 'general_disable_count', 'genesis_simple_share' ) || ( 'facebook' === $icon ) ? 'disableCount: true,' : '';
157
+
158
  // media.
159
  $button = '';
160
 
161
  $scripts .= sprintf(
162
  "$('#%s').sharrre({
163
+ share: {
164
+ %s: true
165
+ },
166
+ urlCurl: '%s',
167
+ enableHover: false,
168
+ enableTracking: true,
169
+ %s
170
+ buttons: { %s },
171
+ click: function(api, options){
172
+ api.simulateClick();
173
+ api.openPopup('%s');
174
+ }
175
+ });\n",
176
  $div_id,
177
  $icon,
178
  GENESIS_SIMPLE_SHARE_URL . '/assets/js/sharrre/sharrre.php',
179
+ $disable_count,
180
  $button,
181
  $icon
182
  );
302
  function genesis_simple_share_preview() {
303
  global $genesis_simple_share;
304
 
305
+ $genesis_simple_share = new Genesis_Simple_Share_Preview();
306
 
307
  }
308
 
plugin.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  /**
3
- *
4
  * Plugin Name: Genesis Simple Share
5
  * Plugin URI: https://wordpress.org/plugins/genesis-simple-share/
6
  * Description: A simple sharing plugin using the Share script.
7
- * Version: 1.1.2
8
  * Author: StudioPress
9
  * Author URI: https://www.studiopress.com
10
  *
@@ -18,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
18
  die( esc_html__( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
19
  }
20
 
21
- define( 'GENESIS_SIMPLE_SHARE_VERSION', '1.1.2' );
22
  define( 'GENESIS_SIMPLE_SHARE_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'GENESIS_SIMPLE_SHARE_INC', plugin_dir_path( __FILE__ ) . '/includes/' );
24
  define( 'GENESIS_SIMPLE_SHARE_URL', plugins_url( '', __FILE__ ) );
1
  <?php
2
  /**
 
3
  * Plugin Name: Genesis Simple Share
4
  * Plugin URI: https://wordpress.org/plugins/genesis-simple-share/
5
  * Description: A simple sharing plugin using the Share script.
6
+ * Version: 1.1.4
7
  * Author: StudioPress
8
  * Author URI: https://www.studiopress.com
9
  *
17
  die( esc_html__( 'Sorry, you are not allowed to access this page directly.', 'genesis-simple-share' ) );
18
  }
19
 
20
+ define( 'GENESIS_SIMPLE_SHARE_VERSION', '1.1.4' );
21
  define( 'GENESIS_SIMPLE_SHARE_PATH', plugin_dir_path( __FILE__ ) );
22
  define( 'GENESIS_SIMPLE_SHARE_INC', plugin_dir_path( __FILE__ ) . '/includes/' );
23
  define( 'GENESIS_SIMPLE_SHARE_URL', plugins_url( '', __FILE__ ) );
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: nathanrice, studiopress, wpmuguru, nick_thegeek, bgardner, marksabbath
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
- Tested up to: 5.1
6
- Stable tag: 1.1.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -31,6 +31,12 @@ https://github.com/copyblogger/genesis-simple-share/wiki/Usage-Tips
31
 
32
  == Changelog ==
33
 
 
 
 
 
 
 
34
  = 1.1.2 =
35
  * Dropped Google+ support.
36
  * Dropped StumbleUpon.
2
  Contributors: nathanrice, studiopress, wpmuguru, nick_thegeek, bgardner, marksabbath
3
  Tags: genesis, share, share buttons, facebook, twitter, pinterest, stumbleupon, linkedin, social
4
  Requires at least: 3.7
5
+ Tested up to: 5.1.1
6
+ Stable tag: 1.1.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.1.4 =
35
+ * Removed Facebook counter.
36
+
37
+ = 1.1.3 =
38
+ * Fixed a bug where the share buttons where not showing.
39
+
40
  = 1.1.2 =
41
  * Dropped Google+ support.
42
  * Dropped StumbleUpon.