AddToAny Share Buttons - Version 1.7.42

Version Description

  • Update the "Show sharing buttons" meta box to not display in the WordPress editor when automatic placement is disabled for the current post type
Download this release

Release Info

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

Code changes from version 1.7.41 to 1.7.42

Files changed (3) hide show
  1. README.txt +5 -2
  2. add-to-any.php +1 -1
  3. addtoany.admin.php +5 -3
README.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: micropat, addtoany
3
  Tags: buttons, share, icons, social media, share buttons, sharing, share button, media, social, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed
4
  Requires at least: 3.7
5
- Tested up to: 5.4
6
  Requires PHP: 5.6
7
- Stable tag: 1.7.41
8
 
9
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, WhatsApp, Pinterest, Reddit, many more, and follow icons too.
10
 
@@ -346,6 +346,9 @@ Upload (or move) the `add-to-any` plugin directory into the `/wp-content/mu-plug
346
 
347
  == Changelog ==
348
 
 
 
 
349
  = 1.7.41 =
350
  * Update Facebook icon color
351
  * Update CSS to automatically set left and right margins for standard placement in content
2
  Contributors: micropat, addtoany
3
  Tags: buttons, share, icons, social media, share buttons, sharing, share button, media, social, marketing, links, email, seo, woocommerce, google, linkedin, reddit, facebook, twitter, pinterest, whatsapp, instagram, youtube, share this, sharethis, feed
4
  Requires at least: 3.7
5
+ Tested up to: 5.5
6
  Requires PHP: 5.6
7
+ Stable tag: 1.7.42
8
 
9
  Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, WhatsApp, Pinterest, Reddit, many more, and follow icons too.
10
 
346
 
347
  == Changelog ==
348
 
349
+ = 1.7.42 =
350
+ * Update the "Show sharing buttons" meta box to not display in the WordPress editor when automatic placement is disabled for the current post type
351
+
352
  = 1.7.41 =
353
  * Update Facebook icon color
354
  * Update CSS to automatically set left and right margins for standard placement in content
add-to-any.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: AddToAny Share Buttons
4
  * Plugin URI: https://www.addtoany.com/
5
  * Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
6
- * Version: 1.7.41
7
  * Author: AddToAny
8
  * Author URI: https://www.addtoany.com/
9
  * Text Domain: add-to-any
3
  * Plugin Name: AddToAny Share Buttons
4
  * Plugin URI: https://www.addtoany.com/
5
  * Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more.
6
+ * Version: 1.7.42
7
  * Author: AddToAny
8
  * Author URI: https://www.addtoany.com/
9
  * Text Domain: add-to-any
addtoany.admin.php CHANGED
@@ -5,11 +5,13 @@
5
  */
6
  function A2A_SHARE_SAVE_add_meta_box() {
7
  $post_types = get_post_types( array( 'public' => true ) );
8
-
9
  $options = get_option( 'addtoany_options', array() );
10
-
11
  $title = apply_filters( 'A2A_SHARE_SAVE_meta_box_title', __( 'AddToAny', 'add-to-any' ) );
 
12
  foreach( $post_types as $post_type ) {
 
 
13
  if (
14
  // If automatic placement is enabled
15
  // for either floating bar
@@ -20,7 +22,7 @@ function A2A_SHARE_SAVE_add_meta_box() {
20
  // for standard buttons in pages
21
  'page' == $post_type && ( ! isset( $options['display_in_pages'] ) || $options['display_in_pages'] != '-1' ) ||
22
  // for standard buttons in a custom post type
23
- ! isset( $options['display_in_cpt_' . $post_type] ) || $options['display_in_cpt_' . $post_type] != '-1'
24
  ) {
25
  // Add meta box
26
  add_meta_box( 'A2A_SHARE_SAVE_meta', $title, 'A2A_SHARE_SAVE_meta_box_content', $post_type, 'side', 'default' );
5
  */
6
  function A2A_SHARE_SAVE_add_meta_box() {
7
  $post_types = get_post_types( array( 'public' => true ) );
8
+ $post_types_not_builtin = get_post_types( array( 'public' => true, '_builtin' => false ) );
9
  $options = get_option( 'addtoany_options', array() );
 
10
  $title = apply_filters( 'A2A_SHARE_SAVE_meta_box_title', __( 'AddToAny', 'add-to-any' ) );
11
+
12
  foreach( $post_types as $post_type ) {
13
+ $is_cpt = in_array( $post_type, $post_types_not_builtin );
14
+
15
  if (
16
  // If automatic placement is enabled
17
  // for either floating bar
22
  // for standard buttons in pages
23
  'page' == $post_type && ( ! isset( $options['display_in_pages'] ) || $options['display_in_pages'] != '-1' ) ||
24
  // for standard buttons in a custom post type
25
+ $is_cpt && ( ! isset( $options['display_in_cpt_' . $post_type] ) || $options['display_in_cpt_' . $post_type] != '-1' )
26
  ) {
27
  // Add meta box
28
  add_meta_box( 'A2A_SHARE_SAVE_meta', $title, 'A2A_SHARE_SAVE_meta_box_content', $post_type, 'side', 'default' );