Changeset 700794
- Timestamp:
- 04/20/2013 03:37:23 PM (13 years ago)
- Location:
- share-center-pro
- Files:
-
- 33 added
- 3 edited
-
tags/2.4.3 (added)
-
tags/2.4.3/inc (added)
-
tags/2.4.3/inc/admin.php (added)
-
tags/2.4.3/inc/index.php (added)
-
tags/2.4.3/inc/setup.php (added)
-
tags/2.4.3/inc/share.js (added)
-
tags/2.4.3/inc/style.css (added)
-
tags/2.4.3/inc/widget.php (added)
-
tags/2.4.3/index.php (added)
-
tags/2.4.3/languages (added)
-
tags/2.4.3/languages/index.php (added)
-
tags/2.4.3/languages/share-center-pro.pot (added)
-
tags/2.4.3/languages/share-center-pro_sk_SK.mo (added)
-
tags/2.4.3/languages/share-center-pro_sk_SK.po (added)
-
tags/2.4.3/lib (added)
-
tags/2.4.3/lib/bit51 (added)
-
tags/2.4.3/lib/bit51/bit51.css (added)
-
tags/2.4.3/lib/bit51/bit51.php (added)
-
tags/2.4.3/lib/bit51/images (added)
-
tags/2.4.3/lib/bit51/images/bit51-small.png (added)
-
tags/2.4.3/lib/bit51/images/bit51.png (added)
-
tags/2.4.3/lib/bit51/images/facebook.png (added)
-
tags/2.4.3/lib/bit51/images/google.png (added)
-
tags/2.4.3/lib/bit51/images/index.php (added)
-
tags/2.4.3/lib/bit51/images/subscribe.png (added)
-
tags/2.4.3/lib/bit51/images/twitter.png (added)
-
tags/2.4.3/lib/bit51/index.php (added)
-
tags/2.4.3/lib/index.php (added)
-
tags/2.4.3/readme.txt (added)
-
tags/2.4.3/screenshot-1.png (added)
-
tags/2.4.3/screenshot-2.png (added)
-
tags/2.4.3/screenshot-3.png (added)
-
tags/2.4.3/share-center-pro.php (added)
-
trunk/lib/bit51/bit51.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/share-center-pro.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-center-pro/trunk/lib/bit51/bit51.php
r622232 r700794 11 11 abstract class Bit51 { 12 12 13 var $feed = 'http:// feeds.feedburner.com/Bit51'; //current address of Bit51.com feed13 var $feed = 'http://bit51.com/feed'; //current address of Bit51.com feed 14 14 15 15 /** … … 350 350 351 351 $feed = fetch_feed( $this->feed ); //get the feed 352 353 $feeditems = $feed->get_items( 0, $feed->get_item_quantity( 5 ) ); //narrow feed to last 5 items 354 355 $content = '<ul>'; //start list 356 357 if ( ! $feeditems ) { 358 359 $content .= '<li class="bit51">' . __( 'No news items, feed might be broken...', $this->hook ) . '</li>'; 352 353 if ( ! isset( $feed->errors ) ) { 354 355 $feeditems = $feed->get_items( 0, $feed->get_item_quantity( 5 ) ); //narrow feed to last 5 items 356 357 $content = '<ul>'; //start list 358 359 if ( ! $feeditems ) { 360 361 $content .= '<li class="bit51">' . __( 'No news items, feed might be broken...', $this->hook ) . '</li>'; 360 362 363 } else { 364 365 foreach ( $feeditems as $item ) { 366 367 $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls = null, 'display' ) ); 368 369 $content .= '<li class="bit51"><a class="rsswidget" href="' . $url . '" target="_blank">'. esc_html( $item->get_title() ) .'</a></li>'; 370 371 } 372 373 } 374 375 $content .= '</ul>'; //end list 376 361 377 } else { 362 363 foreach ( $feeditems as $item ) { 364 365 $url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls = null, 'display' ) ); 366 367 $content .= '<li class="bit51"><a class="rsswidget" href="' . $url . '" target="_blank">'. esc_html( $item->get_title() ) .'</a></li>'; 368 369 } 370 371 } 372 373 $content .= '</ul>'; //end list 378 $content = __( 'It appears as if the feed is currently down. Please try again later', $this->hook ); 379 } 374 380 375 381 $this->postbox( 'bit51posts' , __( 'The Latest from Bit51', $this->hook ), $content ); //set up postbox … … 385 391 function donate() { 386 392 387 $content = __( 'Have you found this plugin useful? Please help support it\'s continued development with a donation of $20, $50, or $100!', $this->hook );393 $content = __( 'Have you found this plugin useful? Please help support it\'s continued development with a donation of $20, $50, or even $100.', $this->hook ); 388 394 389 395 $content .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="' . $this->paypalcode . '"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>'; -
share-center-pro/trunk/readme.txt
r659753 r700794 6 6 Requires at least: 3.0 7 7 Tested up to: 3.5.1 8 Stable tag: 2.4. 28 Stable tag: 2.4.3 9 9 10 10 Adds asynchronous (won't slow your site down) sharing buttons for Google plus, Facebook, Twitter, LinkedIn, Buffer, and Reddit. 11 11 12 == License == 12 == License == 13 13 Released under the terms of the GNU General Public License. 14 14 … … 58 58 59 59 == Changelog == 60 61 = 2.4.3 = 62 * Fixed Bit51 feed with improved error handling 60 63 61 64 = 2.4.2 = -
share-center-pro/trunk/share-center-pro.php
r664543 r700794 4 4 Plugin URI: http://bit51.com/software/share-center-pro/ 5 5 Description: Add common social sharing services in a widget to be used anywhere on your page or at the bottom of your posts or other content. 6 Version: 2.4. 26 Version: 2.4.3 7 7 Text Domain: share-center-pro 8 8 Domain Path: /languages 9 Author: Bit51 .com9 Author: Bit51 10 10 Author URI: http://bit51.com 11 11 License: GPLv2 … … 21 21 class bit51_scp extends Bit51 { 22 22 23 public $pluginversion = '001 4'; //current plugin version23 public $pluginversion = '0015'; //current plugin version 24 24 25 25 //important plugin information … … 146 146 global $scpoptions, $posts, $post; 147 147 148 if ( is_singular() || is_front_page() || is_home() ) { 149 150 151 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); 152 153 if ( is_array( $thumbnail ) && strlen( $thumbnail[0] ) > 1 ) { 154 155 $thumbnail = $thumbnail[0]; 156 157 } else { //get a thumbnail from an image in the post 158 159 $content = $posts[0]->post_content; 148 149 $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); 150 151 if ( is_array( $thumbnail ) && strlen( $thumbnail[0] ) > 1 ) { 152 153 $thumbnail = $thumbnail[0]; 154 155 } else { //get a thumbnail from an image in the post 156 157 $content = $posts[0]->post_content; 158 159 $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches ); 160 161 if ( $output > 0 ) { 162 $thumbnail = $matches[1][0]; 163 } else { 164 $thumbnail = ''; 165 } 166 167 } 168 169 echo "<!--## Begin Share Center Pro Scripts ## -->\n"; 170 171 //add FaceBook OpenGraph Data 172 if ( $scpoptions['fbog'] == 1 ) { 160 173 161 $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches ); 162 163 if ( $output > 0 ) { 164 $thumbnail = $matches[1][0]; 165 } else { 166 $thumbnail = ''; 167 } 168 169 } 170 171 echo '<!--## Begin Share Center Pro Scripts ## -->' . PHP_EOL; 172 173 //add FaceBook OpenGraph Data 174 if ( $scpoptions['fbog'] == 1 ) { 175 176 if( is_singular() ) { 177 178 echo '<meta property="og:title" content="' . get_the_title( $post->ID ) . '" />' . PHP_EOL; 179 echo '<meta property="og:url" content="' . get_permalink( $post->ID ) . '" />' . PHP_EOL; 180 echo '<meta property="og:type" content="article"/>' . PHP_EOL; 181 echo '<meta property="og:description" content="' . strip_tags( the_description() ) . '" />' . PHP_EOL; 182 183 } else { 184 185 echo '<meta property="og:url" content="' . get_site_url() . '" />' . PHP_EOL; 186 echo '<meta property="og:title" content="' . get_bloginfo() . '" />' . PHP_EOL; 187 echo '<meta property="og:type" content="website"/>' . PHP_EOL; 188 echo '<meta property="og:description" content="' . get_bloginfo( 'description' ) . '" />' . PHP_EOL; 189 190 } 191 192 echo '<meta property="og:locale" content="' . get_bloginfo( 'language' ) . '" />' . PHP_EOL; 193 194 if ( strlen( $thumbnail ) > 1 ) { //only display thumbnail if an image is used 195 echo '<meta property="og:image" content="' . $thumbnail . '" />' . PHP_EOL; 196 } 197 198 echo '<meta property="og:site_name" content="' . get_bloginfo() . '" />' . PHP_EOL; 174 echo "<meta property=\"og:title\" content=\"" . get_the_title( $post->ID ) . "\"/>\n" . 175 "<meta property=\"og:type\" content=\"article\"/>\n" . 176 "<meta property=\"og:url\" content=\"" . get_permalink( $post->ID ) . "\"/>\n" . 177 "<meta property=\"og:locale\" content=\"" . get_bloginfo( 'language' ) . "\"/>\n"; 199 178 200 if ( strlen( get_the_author() > 1 ) ) { //only display author if needed 201 echo '<meta property="og:author" content="' . get_the_author() . '" />' . PHP_EOL; 202 } 203 204 if ( strlen( $scpoptions['fbappid'] > 1 ) ) { 205 echo '<meta property="fb:app_id" content="' . $scpoptions['fbappid'] . '" />' . PHP_EOL; 206 } 207 208 } 209 210 //add Twitter card Data 211 if ( $scpoptions['tcmd'] == 1 ) { 212 213 echo '<meta name="twitter:card" content="summary" />' . PHP_EOL; 214 215 if ( strlen( $scpoptions['twitteruser'] > 1 ) ) { 216 echo '<meta name="twitter:site" content="@' . $scpoptions['twitteruser'] . '" />' . PHP_EOL; 217 218 if( is_singular() ) { 219 220 echo '<meta property="twitter:title" content="' . get_the_title( $post->ID ) . '" />' . PHP_EOL; 221 echo '<meta property="twitter:url" content="' . get_permalink( $post->ID ) . '" />' . PHP_EOL; 222 echo '<meta property="twitter:description" content="' . strip_tags( the_description() ) . '" />' . PHP_EOL; 223 224 } else { 225 226 echo '<meta property="twitter:url" content="' . get_site_url() . '" />' . PHP_EOL; 227 echo '<meta property="twitter:title" content="' . get_bloginfo() . '" />' . PHP_EOL; 228 echo '<meta property="twitter:description" content="' . get_bloginfo( 'description' ) . '" />' . PHP_EOL; 229 230 } 231 232 } 233 234 } 235 236 echo '<!--## End Share Center Pro Scripts ## -->' . PHP_EOL; 237 238 } 179 if ( strlen( $thumbnail ) > 1 ) { //only display thumbnail if an image is used 180 echo "<meta property=\"og:image\" content=\"" . $thumbnail . "\"/>\n"; 181 } 182 183 echo "<meta property=\"og:site_name\" content=\"" . get_bloginfo() . "\"/>\n"; 184 185 if ( strlen( get_the_author() > 1 ) ) { //only display author if needed 186 echo "<meta property=\"og:author\" content=\"" . get_the_author() . "\" />\n"; 187 } 188 189 if ( is_home() || is_front_page() ) { 190 echo "<meta property=\"og:description\" content=\"" . get_bloginfo( 'description' ) . "\"/>\n"; 191 } else if ( is_singular() ) { 192 echo "<meta property=\"og:description\" content=\"" . strip_tags( get_the_excerpt() ) . "\"/>\n"; 193 } 194 195 if ( strlen( $scpoptions['fbappid'] > 1 ) ) { 196 echo "<meta property=\"fb:app_id\" content=\"" . $scpoptions['fbappid'] . "\" />\n"; 197 } 198 199 } 200 201 //add Twitter card Data 202 if ( $scpoptions['tcmd'] == 1 ) { 203 204 echo "<meta name=\"twitter:card\" content=\"summary\">\n"; 205 206 if ( strlen( $scpoptions['twitteruser'] > 1 ) ) { 207 echo "<meta name=\"twitter:site\" content=\"@" . $scpoptions['twitteruser'] . "\">\n"; 208 } 209 210 if ( is_home() || is_front_page() ) { 211 echo "<meta property=\"twitter:description\" content=\"" . get_bloginfo( 'description' ) . "\"/>\n"; 212 } else if ( is_singular() ) { 213 echo "<meta property=\"twitter:description\" content=\"" . strip_tags( get_the_excerpt() ) . "\"/>\n"; 214 } 215 216 echo "<meta property=\"twitter:title\" content=\"" . get_the_title( $post->ID ) . "\"/>\n"; 217 echo "<meta property=\"twitter:url\" content=\"" . get_permalink( $post->ID ) . "\"/>\n"; 218 219 } 220 221 echo "<!--## End Share Center Pro Scripts ## -->\n"; 239 222 240 223 }
Note: See TracChangeset
for help on using the changeset viewer.