Changeset 1069466
- Timestamp:
- 01/16/2015 03:20:53 PM (11 years ago)
- Location:
- addthis/trunk
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
addthis-for-wordpress.php (modified) (4 diffs)
-
addthis-toolbox.php (modified) (6 diffs)
-
addthis_social_widget.php (modified) (2 diffs)
-
includes/addthis_addjs_new.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
addthis/trunk
-
Property
svn:ignore
set to
*.mdown
-
Property
svn:ignore
set to
-
addthis/trunk/addthis-for-wordpress.php
r1033873 r1069466 173 173 $updateResult = $this->updateSettings($this->_postVariables); 174 174 } 175 176 175 wp_enqueue_script( 177 176 'addThisScript', … … 194 193 public function updateSettings($settings) 195 194 { 196 //global $addthis_addjs;197 195 if(isset($settings['pubid'])){ 198 196 $this->_options['profile'] = $settings['pubid']; … … 422 420 self::getSettingsPageUrl()."&advanced_settings=true'". 423 421 " 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 }440 422 441 423 return $html; … … 527 509 "name='pubid' id='addthis-pubid'/>"; 528 510 $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 543 512 $submitButtonValue = "Confirm and Save"; 544 513 -
addthis/trunk/addthis-toolbox.php
r1067109 r1069466 50 50 const AT_ABOVE_POST = "at-above-post"; 51 51 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"; 52 56 const AT_CONTENT_BELOW_POST_HOME = "at-below-post-homepage-recommended"; 53 57 const AT_CONTENT_BELOW_POST_PAGE = "at-below-post-page-recommended"; 54 58 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"; 55 61 const AT_CONTENT_ABOVE_POST_HOME = "at-above-post-homepage-recommended"; 56 62 const AT_CONTENT_ABOVE_POST_PAGE = "at-above-post-page-recommended"; 57 63 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"; 58 66 59 67 /** … … 84 92 $at_flag = get_post_meta( $postid, '_at_widget', TRUE ); 85 93 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'){ 93 95 $content = self::_buildDiv(self::AT_ABOVE_POST_HOME) . 94 96 self::_buildDiv(self::AT_CONTENT_ABOVE_POST_HOME) . … … 98 100 } 99 101 } 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'){ 107 103 $content = self::_buildDiv(self::AT_ABOVE_POST_PAGE) . 108 104 self::_buildDiv(self::AT_CONTENT_ABOVE_POST_PAGE) . … … 112 108 } 113 109 } else if (is_single()) { 114 if($at_flag != '' &&$at_flag == '1'){110 if($at_flag == '' || $at_flag == '1'){ 115 111 $content = self::_buildDiv(self::AT_ABOVE_POST) . 116 112 self::_buildDiv(self::AT_CONTENT_ABOVE_POST) . … … 118 114 $content .= self::_buildDiv(self::AT_BELOW_POST); 119 115 $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);126 116 } 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 } 128 134 } 129 135 … … 142 148 $title = get_the_title(); 143 149 $url = get_permalink(); 144 return "<div class='".$class." addthis-toolbox '".150 return "<div class='".$class." addthis-toolbox at-wordpress-hide'". 145 151 " data-title='".$title."' data-url='".$url."'>". 146 152 "</div>"; -
addthis/trunk/addthis_social_widget.php
r1025150 r1069466 24 24 * Plugin URI: http://www.addthis.com 25 25 * 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. 126 * Version: 4.0.2 27 27 * 28 28 * Author: The AddThis Team … … 33 33 34 34 define( 'addthis_style_default' , 'fb_tw_p1_sc'); 35 define( 'ADDTHIS_PLUGIN_VERSION' , '4.0 ');36 define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-4.0 ');35 define( 'ADDTHIS_PLUGIN_VERSION' , '4.0.2'); 36 define( 'ADDTHIS_PRODUCT_VERSION' , 'wpp-4.0.2'); 37 37 define( 'ADDTHIS_ATVERSION', '300'); 38 38 define( 'ADDTHIS_ATVERSION_MANUAL_UPDATE', -1); -
addthis/trunk/includes/addthis_addjs_new.php
r1067644 r1069466 68 68 69 69 // 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'));71 70 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 75 71 76 72 // Footer … … 165 161 $addthis_settings_options = get_option('addthis_settings'); 166 162 $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>'; 173 165 } 174 166 } … … 209 201 public function register_post_at_flag() { 210 202 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'); 211 204 } 212 205 /* … … 216 209 $at_flag = get_post_meta($post->ID, '_at_widget', true); 217 210 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'){ 219 212 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'){ 221 214 echo "<input type='checkbox' name='_at_widget' id='at_widget' value='1'/>"; 222 215 } -
addthis/trunk/readme.txt
r1052725 r1069466 4 4 Requires at least: 3.0 5 5 Tested up to: 4.1 6 Stable tag: 4.0. 16 Stable tag: 4.0.2 7 7 8 8 AddThis provides the best sharing, social, recommended content, and conversion tools to help you make … … 82 82 83 83 == Changelog == 84 85 = 4.0.2 = 86 * Control inline share buttons for each page/post 87 * Bug fixes 84 88 85 89 = 4.0.1 = … … 276 280 277 281 == Upgrade Notice == 282 283 = 4.0.2 = 284 * Control inline share buttons for each page/post 285 * Bug fixes 286 278 287 = 4.0.1 = 279 288 * Fix for automatically converting profile types to Wordpress type.
Note: See TracChangeset
for help on using the changeset viewer.