WordPress.org

Plugin Directory

Changeset 1704741


Ignore:
Timestamp:
07/28/17 22:46:39 (8 weeks ago)
Author:
micropat
Message:

1.7.14

  • Fix standard placement option for WooCommerce Product types
Location:
add-to-any/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • add-to-any/trunk/README.txt

    r1703408 r1704741  
    44Requires at least: 3.7 
    55Tested up to: 4.8 
    6 Stable tag: 1.7.13 
     6Stable tag: 1.7.14 
    77 
    88Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too. 
     
    349349 
    350350== Changelog == 
     351 
     352= 1.7.14 = 
     353* Fix the standard placement option for WooCommerce Product types 
    351354 
    352355= 1.7.13 = 
  • add-to-any/trunk/add-to-any.php

    r1703408 r1704741  
    44Plugin URI: https://www.addtoany.com/ 
    55Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. 
    6 Version: 1.7.13 
     6Version: 1.7.14 
    77Author: AddToAny 
    88Author URI: https://www.addtoany.com/ 
  • add-to-any/trunk/addtoany.compat.php

    r1703408 r1704741  
    2929 
    3030function addtoany_amp_additional_css_styles( $amp_template ) { 
    31     // only CSS here please... 
     31    // CSS only 
    3232    ?> 
    3333    .addtoany_list a { 
     
    5252function addtoany_woocommerce_share() { 
    5353    remove_filter( 'the_content', 'A2A_SHARE_SAVE_add_to_content', 98 ); 
    54     ADDTOANY_SHARE_SAVE_KIT(); 
     54    remove_filter( 'the_excerpt', 'A2A_SHARE_SAVE_add_to_content', 98 );     
     55     
     56    $options = get_option( 'addtoany_options', array() ); 
     57    $sharing_disabled = get_post_meta( get_the_ID(), 'sharing_disabled', true ); 
     58    $sharing_disabled = apply_filters( 'addtoany_sharing_disabled', $sharing_disabled ); 
     59    $post_type = get_post_type( get_the_ID() ); 
     60     
     61    if (  
     62        // Private post 
     63        get_post_status( get_the_ID() ) == 'private' || 
     64        // Sharing disabled on post 
     65        ! empty( $sharing_disabled ) || 
     66        // Custom post type (usually "product") disabled 
     67        ( $post_type && isset( $options['display_in_cpt_' . $post_type] ) && $options['display_in_cpt_' . $post_type] == '-1' ) 
     68    ) { 
     69        return; 
     70    } else { 
     71        // Display share buttons 
     72        ADDTOANY_SHARE_SAVE_KIT(); 
     73    } 
    5574} 
Note: See TracChangeset for help on using the changeset viewer.