AddToAny Share Buttons - Version 1.2.6

Version Description

  • Harden option to disable sharing buttons on each post and page
    • Extend option to custom post types
Download this release

Release Info

Developer micropat
Plugin Icon 128x128 AddToAny Share Buttons
Version 1.2.6
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.6

Files changed (2) hide show
  1. README.txt +5 -1
  2. add-to-any.php +5 -5
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: micropat
3
  Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
- Stable tag: 1.2.5
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
@@ -231,6 +231,10 @@ Upload the plugin directory (including all files and directories within) to the
231
 
232
  == Changelog ==
233
 
 
 
 
 
234
  = 1.2.5 =
235
  * Large SVG icons are the default sharing format
236
  * Default standalone services are Facebook, Twitter, Google Plus
3
  Tags: sharing, share, sharethis, bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, sidebar, widget, email, e-mail, seo, button, delicious, google, tumblr, linkedin, digg, reddit, facebook, facebook like, like, myspace, twitter, tweet, +1, plus 1, google plus, google plus one, plus one, pinterest, pin, pin it, pinit, messenger, stumbleupon, technorati, lockerz, addthis, sexybookmarks, sociable, sharedaddy, shareaholic, icon, icons, vector, SVG, wpmu, addtoany
4
  Requires at least: 2.8
5
  Tested up to: 3.7
6
+ Stable tag: 1.2.6
7
 
8
  Share buttons for WordPress including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more.
9
 
231
 
232
  == Changelog ==
233
 
234
+ = 1.2.6 =
235
+ * Harden option to disable sharing buttons on each post and page
236
+ * Extend option to custom post types
237
+
238
  = 1.2.5 =
239
  * Large SVG icons are the default sharing format
240
  * Default standalone services are Facebook, Twitter, Google Plus
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: http://www.addtoany.com/
5
  Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
- Version: 1.2.5
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
@@ -597,7 +597,7 @@ function A2A_SHARE_SAVE_add_to_content($content) {
597
 
598
  $is_feed = is_feed();
599
  $options = get_option('addtoany_options');
600
- $sharing_disabled = get_post_meta( get_the_ID(), 'sharing_disabled', false );
601
 
602
  if( ! $A2A_SHARE_SAVE_auto_placement_ready)
603
  return $content;
@@ -606,7 +606,7 @@ function A2A_SHARE_SAVE_add_to_content($content) {
606
  return $content;
607
 
608
  // Disabled for this post?
609
- if ( !empty( $sharing_disabled ) )
610
  return $content;
611
 
612
  if (
@@ -769,7 +769,7 @@ function A2A_SHARE_SAVE_meta_box_content( $post ) {
769
 
770
  <p>
771
  <label for="enable_post_addtoany_sharing">
772
- <input type="checkbox" name="enable_post_addtoany_sharing" id="enable_post_addtoany_sharing" value="1" <?php checked( !$disabled ); ?>>
773
  <?php _e( 'Show sharing buttons.' , 'add-to-any'); ?>
774
  </label>
775
  <input type="hidden" name="addtoany_sharing_status_hidden" value="1" />
@@ -785,7 +785,7 @@ function A2A_SHARE_SAVE_meta_box_save( $post_id ) {
785
  return $post_id;
786
 
787
  // Save sharing_disabled if "Show sharing buttons" checkbox is unchecked
788
- if ( isset( $_POST['post_type'] ) && ( 'post' == $_POST['post_type'] || 'page' == $_POST['post_type'] ) ) {
789
  if ( current_user_can( 'edit_post', $post_id ) ) {
790
  if ( isset( $_POST['addtoany_sharing_status_hidden'] ) ) {
791
  if ( !isset( $_POST['enable_post_addtoany_sharing'] ) ) {
3
  Plugin Name: Share Buttons by AddToAny
4
  Plugin URI: http://www.addtoany.com/
5
  Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, StumbleUpon and many more. [<a href="options-general.php?page=add-to-any.php">Settings</a>]
6
+ Version: 1.2.6
7
  Author: micropat
8
  Author URI: http://www.addtoany.com/
9
  */
597
 
598
  $is_feed = is_feed();
599
  $options = get_option('addtoany_options');
600
+ $sharing_disabled = get_post_meta( get_the_ID(), 'sharing_disabled', true );
601
 
602
  if( ! $A2A_SHARE_SAVE_auto_placement_ready)
603
  return $content;
606
  return $content;
607
 
608
  // Disabled for this post?
609
+ if ( ! empty( $sharing_disabled ) )
610
  return $content;
611
 
612
  if (
769
 
770
  <p>
771
  <label for="enable_post_addtoany_sharing">
772
+ <input type="checkbox" name="enable_post_addtoany_sharing" id="enable_post_addtoany_sharing" value="1" <?php checked( empty( $disabled ) ); ?>>
773
  <?php _e( 'Show sharing buttons.' , 'add-to-any'); ?>
774
  </label>
775
  <input type="hidden" name="addtoany_sharing_status_hidden" value="1" />
785
  return $post_id;
786
 
787
  // Save sharing_disabled if "Show sharing buttons" checkbox is unchecked
788
+ if ( isset( $_POST['post_type'] ) ) {
789
  if ( current_user_can( 'edit_post', $post_id ) ) {
790
  if ( isset( $_POST['addtoany_sharing_status_hidden'] ) ) {
791
  if ( !isset( $_POST['enable_post_addtoany_sharing'] ) ) {