Plugin Directory

Changeset 1069466


Ignore:
Timestamp:
01/16/2015 03:20:53 PM (11 years ago)
Author:
srijith.v
Message:

Releasing 4.0.2

Location:
addthis/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • addthis/trunk

    • Property svn:ignore set to
      *.mdown
  • addthis/trunk/addthis-for-wordpress.php

    r1033873 r1069466  
    173173            $updateResult = $this->updateSettings($this->_postVariables);
    174174        }
    175        
    176175        wp_enqueue_script(
    177176            'addThisScript',
     
    194193    public function updateSettings($settings)
    195194    {
    196         //global $addthis_addjs;
    197195        if(isset($settings['pubid'])){
    198196            $this->_options['profile'] = $settings['pubid'];
     
    422420                  self::getSettingsPageUrl()."&advanced_settings=true'".
    423421                  " class='addthis_reset_button'>Edit Profile Settings</a>";
    424        
    425         if ($this->_pubid) {
    426             $asyncLoading = (isset($this->_options)
    427                             && isset($this->_options['addthis_asynchronous_loading']))
    428                             && $this->_options['addthis_asynchronous_loading']
    429                             ? 'checked'
    430                             : '';
    431             $html .= "<div class='addthis_reset_button addthis_async'>";
    432             $html .= "<span>Asynchronous Loading : </span>";
    433             $html .= "<input id='async_load' type='checkbox' name='async_loading' ".
    434                       $asyncLoading.">";
    435             $html .= "<span class='at-loader hide'>".
    436                      "<img src='".plugins_url('images/ajax-loader.gif', __FILE__)."'>".
    437                      "</span>";
    438             $html .= "</div>";
    439         }
    440422
    441423        return $html;
     
    527509                      "name='pubid' id='addthis-pubid'/>";
    528510        $html .=  "</div></div>";
    529        
    530         //$asyncLoading = (isset($this->_options)
    531         //                && isset($this->_options['addthis_asynchronous_loading']))
    532         //               ? 'checked'
    533         //                : '';
    534        
    535 //        $html .= "<div class='clear_both'>";
    536 //        $html .= "<span>Asynchronous Loading : </span>";
    537 //        $html .= "<input type='checkbox' name='async_loading' ".
    538 //                  $asyncLoading.">";
    539 //        $html .= "</div>";
    540        
    541        
    542        
     511
    543512        $submitButtonValue = "Confirm and Save";
    544513       
  • addthis/trunk/addthis-toolbox.php

    r1067109 r1069466  
    5050    const AT_ABOVE_POST = "at-above-post";
    5151    const AT_BELOW_POST = "at-below-post";
     52    const AT_ABOVE_POST_CAT_PAGE = "at-above-post-cat-page";
     53    const AT_BELOW_POST_CAT_PAGE = "at-below-post-cat-page";
     54    const AT_ABOVE_POST_ARCH_PAGE = "at-above-post-arch-page";
     55    const AT_BELOW_POST_ARCH_PAGE = "at-below-post-arch-page";   
    5256    const AT_CONTENT_BELOW_POST_HOME = "at-below-post-homepage-recommended";
    5357    const AT_CONTENT_BELOW_POST_PAGE = "at-below-post-page-recommended";
    5458    const AT_CONTENT_BELOW_POST = "at-below-post-recommended";
     59    const AT_CONTENT_BELOW_CAT_PAGE = "at-below-post-cat-page-recommended";
     60    const AT_CONTENT_BELOW_ARCH_PAGE = "at-below-post-arch-page-recommended";   
    5561    const AT_CONTENT_ABOVE_POST_HOME = "at-above-post-homepage-recommended";
    5662    const AT_CONTENT_ABOVE_POST_PAGE = "at-above-post-page-recommended";
    5763    const AT_CONTENT_ABOVE_POST = "at-above-post-recommended";
     64    const AT_CONTENT_ABOVE_CAT_PAGE = "at-above-post-cat-page-recommended";
     65    const AT_CONTENT_ABOVE_ARCH_PAGE = "at-above-post-arch-page-recommended";
    5866
    5967    /**
     
    8492            $at_flag = get_post_meta( $postid, '_at_widget', TRUE );
    8593            if (is_home() || is_front_page()) {
    86                 if($at_flag != '' && $at_flag == '1'){
    87                     $content  = self::_buildDiv(self::AT_ABOVE_POST_HOME) .
    88                                 self::_buildDiv(self::AT_CONTENT_ABOVE_POST_HOME) .
    89                                 $content;
    90                     $content .= self::_buildDiv(self::AT_BELOW_POST_HOME);
    91                     $content .= self::_buildDiv(self::AT_CONTENT_BELOW_POST_HOME);
    92                 } else if($at_flag == ''){
     94                if($at_flag == '' || $at_flag == '1'){
    9395                    $content  = self::_buildDiv(self::AT_ABOVE_POST_HOME) .
    9496                                self::_buildDiv(self::AT_CONTENT_ABOVE_POST_HOME) .
     
    98100                }
    99101            } else if (is_page()) {
    100                 if($at_flag != '' && $at_flag == '1'){
    101                     $content  = self::_buildDiv(self::AT_ABOVE_POST_PAGE) .
    102                                 self::_buildDiv(self::AT_CONTENT_ABOVE_POST_PAGE) .
    103                                 $content;
    104                     $content .= self::_buildDiv(self::AT_BELOW_POST_PAGE);
    105                     $content .= self::_buildDiv(self::AT_CONTENT_BELOW_POST_PAGE);
    106                 } else if($at_flag == ''){
     102                if($at_flag == '' || $at_flag == '1'){
    107103                    $content  = self::_buildDiv(self::AT_ABOVE_POST_PAGE) .
    108104                                self::_buildDiv(self::AT_CONTENT_ABOVE_POST_PAGE) .
     
    112108                }
    113109            } else if (is_single()) {
    114                 if($at_flag != '' && $at_flag == '1'){
     110                if($at_flag == '' || $at_flag == '1'){
    115111                    $content  = self::_buildDiv(self::AT_ABOVE_POST) .
    116112                                self::_buildDiv(self::AT_CONTENT_ABOVE_POST) .
     
    118114                    $content .= self::_buildDiv(self::AT_BELOW_POST);
    119115                    $content .= self::_buildDiv(self::AT_CONTENT_BELOW_POST);
    120                 } else if($at_flag == ''){
    121                     $content  = self::_buildDiv(self::AT_ABOVE_POST) .
    122                             self::_buildDiv(self::AT_CONTENT_ABOVE_POST) .
    123                             $content;
    124                     $content .= self::_buildDiv(self::AT_BELOW_POST);
    125                     $content .= self::_buildDiv(self::AT_CONTENT_BELOW_POST);
    126116                }
    127             }
     117            }  else if (is_category()) {
     118                if($at_flag == '' || $at_flag == '1'){
     119                    $content  = self::_buildDiv(self::AT_ABOVE_POST_CAT_PAGE) .
     120                                self::_buildDiv(self::AT_CONTENT_ABOVE_CAT_PAGE) .
     121                                $content;
     122                    $content .= self::_buildDiv(self::AT_BELOW_POST_CAT_PAGE);
     123                    $content .= self::_buildDiv(self::AT_CONTENT_BELOW_CAT_PAGE);
     124                }
     125            }  else if (is_archive()) {
     126                if($at_flag == '' || $at_flag == '1'){
     127                    $content  = self::_buildDiv(self::AT_ABOVE_POST_ARCH_PAGE) .
     128                                self::_buildDiv(self::AT_CONTENT_ABOVE_ARCH_PAGE) .
     129                                $content;
     130                    $content .= self::_buildDiv(self::AT_BELOW_POST_ARCH_PAGE);
     131                    $content .= self::_buildDiv(self::AT_CONTENT_BELOW_ARCH_PAGE);
     132                }
     133            }     
    128134        }
    129135
     
    142148        $title = get_the_title();
    143149        $url   = get_permalink();
    144         return "<div class='".$class." addthis-toolbox'".
     150        return "<div class='".$class." addthis-toolbox at-wordpress-hide'".
    145151                   " data-title='".$title."' data-url='".$url."'>".
    146152                "</div>";
  • addthis/trunk/addthis_social_widget.php

    r1025150 r1069466  
    2424* Plugin URI: http://www.addthis.com
    2525* Description: Use the AddThis suite of website tools which includes sharing, following, recommended content, and conversion tools to help you make your website smarter. With AddThis, you can see how your users are engaging with your content, provide a personalized experience for each user and encourage them to share, subscribe or follow.
    26 * Version: 4.0.1
     26* Version: 4.0.2
    2727*
    2828* Author: The AddThis Team
     
    3333
    3434define( 'addthis_style_default' , 'fb_tw_p1_sc');
    35 define( 'ADDTHIS_PLUGIN_VERSION' , '4.0');
    36 define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-4.0');
     35define( 'ADDTHIS_PLUGIN_VERSION' , '4.0.2');
     36define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-4.0.2');
    3737define( 'ADDTHIS_ATVERSION', '300');
    3838define( 'ADDTHIS_ATVERSION_MANUAL_UPDATE', -1);
  • addthis/trunk/includes/addthis_addjs_new.php

    r1067644 r1069466  
    6868
    6969        // for saving custom field value for show/hide addthis sharing button in admin post add/edit page.
    70         add_action('pre_post_update', array($this, 'save_at_flag'));
    7170        add_action('save_post', array($this, 'save_at_flag'));
    72         add_action('publish_post', array($this, 'save_at_flag'));
    73         add_action('edit_page_form', array($this, 'save_at_flag'));
    74 
    7571
    7672        // Footer
     
    165161            $addthis_settings_options = get_option('addthis_settings');
    166162            $addthis_asynchronous_loading = (isset($addthis_settings_options['addthis_asynchronous_loading']))?$addthis_settings_options['addthis_asynchronous_loading']:false;
    167             if(isset($addthis_asynchronous_loading) && $addthis_asynchronous_loading) {
    168                 $this->jsToAdd .= '<script type="text/javascript" src="//s7.addthis.com/js/'.$this->atversion.'/addthis_widget.js#pubid='. urlencode( $this->pubid ).'&async=1"></script>';
    169                 $this->jsToAdd .= '<script type="text/javascript">jQuery(document).ready(function($) { addthis.init(); }); </script>';
    170             } else {
    171                 $this->jsToAdd .= '<script type="text/javascript" src="//s7.addthis.com/js/'.$this->atversion.'/addthis_widget.js#pubid='. urlencode( $this->pubid ).'&async=15"></script>';
    172             }
     163            $this->jsToAdd .= '<script type="text/javascript" src="//s7.addthis.com/js/'.$this->atversion.'/addthis_widget.js#pubid='. urlencode( $this->pubid ).'" async="async"></script>';
     164            $this->jsToAdd .= '<script type="text/javascript">jQuery(document).ready(function($) { addthis.init(); }); </script>';
    173165        }
    174166    }
     
    209201    public function register_post_at_flag() {
    210202        add_meta_box('at_widget', __('AddThis For Wordpress'), array($this, 'add_at_flag_meta_box'), 'post', 'advanced', 'high');
     203        add_meta_box('at_widget', __('AddThis For Wordpress'), array($this, 'add_at_flag_meta_box'), 'page', 'advanced', 'high');
    211204    }
    212205    /*
     
    216209        $at_flag = get_post_meta($post->ID, '_at_widget', true);
    217210        echo "<label for='_at_widget'>".__('Show AddThis Sharing buttons: ', 'foobar')."</label>";
    218         if($at_flag != '' && $at_flag == '1'){
     211        if($at_flag == '' || $at_flag == '1'){
    219212            echo "<input type='checkbox' name='_at_widget' id='at_widget' value='1' checked='checked'/>";
    220         } else if($at_flag == '' || $at_flag == '0'){
     213        } else if($at_flag == '0'){
    221214            echo "<input type='checkbox' name='_at_widget' id='at_widget' value='1'/>";
    222215        }
  • addthis/trunk/readme.txt

    r1052725 r1069466  
    44Requires at least: 3.0
    55Tested up to: 4.1
    6 Stable tag: 4.0.1
     6Stable tag: 4.0.2
    77
    88AddThis provides the best sharing, social, recommended content, and conversion tools to help you make
     
    8282
    8383== Changelog ==
     84
     85= 4.0.2 =
     86* Control inline share buttons for each page/post
     87* Bug fixes
    8488
    8589= 4.0.1 =
     
    276280
    277281== Upgrade Notice ==
     282
     283= 4.0.2 =
     284* Control inline share buttons for each page/post
     285* Bug fixes
     286
    278287= 4.0.1 =
    279288* Fix for automatically converting profile types to Wordpress type.
Note: See TracChangeset for help on using the changeset viewer.