Changeset 1011972
- Timestamp:
- 10/22/2014 08:48:41 AM (11 years ago)
- Location:
- crafty-social-buttons/trunk
- Files:
-
- 34 added
- 33 edited
-
README.txt (modified) (6 diffs)
-
assets/banner-772x250.jpg (added)
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
assets/screenshot-5.png (added)
-
buttons/arbenting/ebay.png (added)
-
buttons/arbenting/specificfeeds.png (added)
-
buttons/arbenting/vimeo.png (added)
-
buttons/crafty-stitchy-round/ebay.png (added)
-
buttons/crafty-stitchy-round/specificfeeds.png (added)
-
buttons/crafty-stitchy-round/vimeo.png (added)
-
buttons/crafty-stitchy-square/ebay.png (added)
-
buttons/crafty-stitchy-square/specificfeeds.png (added)
-
buttons/crafty-stitchy-square/vimeo.png (added)
-
buttons/metal/ebay.png (added)
-
buttons/metal/specificfeeds.png (added)
-
buttons/metal/vimeo.png (added)
-
buttons/pagepeel/ebay.png (added)
-
buttons/pagepeel/specificfeeds.png (added)
-
buttons/pagepeel/vimeo.png (added)
-
buttons/pagepeel/vimeo_64x64.png (added)
-
buttons/ribbons/ebay.png (added)
-
buttons/ribbons/specificfeeds.png (added)
-
buttons/simple/ebay.png (added)
-
buttons/simple/specificfeeds.png (added)
-
buttons/simple/vimeo.png (added)
-
buttons/somacro/ebay.png (added)
-
buttons/somacro/simplefeeds.png (added)
-
buttons/somacro/specificfeeds.png (added)
-
buttons/somacro/vimeo.png (added)
-
class-SH-Crafty-Social-Buttons-Admin.php (modified) (1 diff)
-
class-SH-Crafty-Social-Buttons-Plugin.php (modified) (2 diffs)
-
class-SH-Crafty-Social-Buttons-Shortcode.php (modified) (2 diffs)
-
class-SH-Crafty-Social-Buttons-Widget.php (modified) (5 diffs)
-
crafty-social-buttons.php (modified) (2 diffs)
-
css/admin.min.css (modified) (1 diff)
-
css/public.min.css (modified) (1 diff)
-
help/about-me-tab.php (modified) (1 diff)
-
help/action-hook-tab.php (modified) (1 diff)
-
help/link-tab.php (modified) (1 diff)
-
js/admin.min.js (modified) (1 diff)
-
js/public.min.js (modified) (1 diff)
-
services/class-SH_Craftsy.php (modified) (1 diff)
-
services/class-SH_Digg.php (modified) (1 diff)
-
services/class-SH_Ebay.php (added)
-
services/class-SH_Email.php (modified) (2 diffs)
-
services/class-SH_Etsy.php (modified) (1 diff)
-
services/class-SH_Facebook.php (modified) (1 diff)
-
services/class-SH_Flickr.php (modified) (1 diff)
-
services/class-SH_Google.php (modified) (1 diff)
-
services/class-SH_Instagram.php (modified) (1 diff)
-
services/class-SH_LinkedIn.php (modified) (1 diff)
-
services/class-SH_Pinterest.php (modified) (2 diffs)
-
services/class-SH_RSS.php (modified) (2 diffs)
-
services/class-SH_Ravelry.php (modified) (1 diff)
-
services/class-SH_Reddit.php (modified) (1 diff)
-
services/class-SH_Social_Service.php (modified) (4 diffs)
-
services/class-SH_SpecificFeeds.php (added)
-
services/class-SH_StumbleUpon.php (modified) (1 diff)
-
services/class-SH_Tumblr.php (modified) (1 diff)
-
services/class-SH_Twitter.php (modified) (1 diff)
-
services/class-SH_Vimeo.php (added)
-
services/class-SH_YouTube.php (modified) (1 diff)
-
views/admin.php (modified) (1 diff)
-
views/widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
crafty-social-buttons/trunk/README.txt
r1001035 r1011972 25 25 Supported social services include: 26 26 27 * Craftsy (link only) 27 28 * Digg 28 * Craftsy (link only)29 * Ebay (link only) 29 30 * Email (share only) 30 31 * Etsy (link only) … … 37 38 * Ravelry 38 39 * Reddit 40 * Specific Feeds (link only) 39 41 * Stumble Upon 40 42 * Tumblr 41 43 * Twitter 44 * Vimeo 42 45 * YouTube 43 46 … … 74 77 * [csblink] for the *Link buttons* 75 78 * [csbshare] for the *Share buttons* 76 * [csbpageshare] for the *Page Share buttons* (to go outside loop)77 79 78 80 If your theme doesn't have a widget area where you want the buttons to be placed, you can include them by editing your theme template. Just include one of these links in your template to generate the buttons: … … 93 95 94 96 == Changelog == 97 98 = 1.3.8 = 99 * Added link buttons for Ebay, Vimeo and SpecificFeeds 100 * Stopped email links opening a blank window 101 * Added titles to share and link buttons 95 102 96 103 = 1.3.7 = … … 192 199 == Upgrade Notice == 193 200 201 = 1.3.8 = 202 * Add link buttons for Ebay, Vimeo and SpecificFeeds (allows visitors to subscribe by email) 203 194 204 = 1.3.7 = 195 205 * Fixes Facebook share counts not appearing … … 248 258 These are the things currently in the pipeline: 249 259 260 * Adding the ability to hide buttons on specific pages 250 261 * Choosing which post types the share buttons are added to 251 * Adding more services (ebay, Xing, Vimeo)252 262 * (Anything else? You tell me!) -
crafty-social-buttons/trunk/class-SH-Crafty-Social-Buttons-Admin.php
r975000 r1011972 763 763 764 764 } 765 766 ?> -
crafty-social-buttons/trunk/class-SH-Crafty-Social-Buttons-Plugin.php
r975854 r1011972 335 335 'link_caption_position' => 'inline-block', 336 336 'link_alignment' => 'left', 337 'link_services' => 'Facebook,Google,Twitter,Ravelry,Etsy ',337 'link_services' => 'Facebook,Google,Twitter,Ravelry,Etsy,SpecificFeeds', 338 338 'new_window' => true, 339 339 ); … … 341 341 } 342 342 343 344 343 } 345 ?> -
crafty-social-buttons/trunk/class-SH-Crafty-Social-Buttons-Shortcode.php
r975711 r1011972 170 170 // use wordpress functions for page/post details 171 171 172 if ($sharePageUrl ) {172 if ($sharePageUrl || !$post) { 173 173 $postId = "page"; 174 174 $url = home_url( $wp->request ); … … 294 294 295 295 296 } // end Plugin class 297 ?> 296 } -
crafty-social-buttons/trunk/class-SH-Crafty-Social-Buttons-Widget.php
r975000 r1011972 48 48 49 49 $buttonType = isset($instance['buttonType']) ? $instance['buttonType'] : 'csblink'; 50 $before_widget = isset($instance['$before_widget']) ? $instance['$before_widget'] : ''; 51 $after_widget = isset($instance['$after_widget']) ? $instance['$after_widget'] : ''; 50 52 51 echo $before_widget; 53 echo $before_widget; 52 54 $shortcode = "[$buttonType]"; 53 55 … … 61 63 * Processes the widget's options to be saved. 62 64 * 63 * @param array new_instance The previous instance of values before the update. 64 * @param array old_instance The new instance of values to be generated via the update. 65 * @param array new_instance The previous instance of values before the update. 66 * @param array old_instance The new instance of values to be generated via the update. 67 * 68 * @return array 65 69 */ 66 70 public function update( $new_instance, $old_instance ) { … … 76 80 * Generates the administration form for the widget. 77 81 * 78 * @param array instance The array of keys and values for the widget. 82 * @param array instance The array of keys and values for the widget. 83 * 84 * @return string|void 79 85 */ 80 86 public function form( $instance ) { … … 82 88 extract($instance); 83 89 84 $buttonType = isset($instance['buttonType']) ? $ buttonType : 'csblink';90 $buttonType = isset($instance['buttonType']) ? $instance['buttonType'] : 'csblink'; 85 91 86 92 include( plugin_dir_path( __FILE__ ) . '/views/widget.php' ); … … 99 105 return self::$instance; 100 106 } 101 102 103 104 } 105 ?> 107 } -
crafty-social-buttons/trunk/crafty-social-buttons.php
r1001035 r1011972 16 16 * Plugin URI: http://github.com/sarahhenderson/crafty-social-buttons 17 17 * Description: Adds social sharing buttons and links to your site, including Ravelry, Etsy, Craftsy and Pinterest 18 * Version: 1.3. 718 * Version: 1.3.8 19 19 * Author: Sarah Henderson 20 20 * Author URI: http://sarahhenderson.info … … 30 30 } 31 31 32 // include our fourmain classes32 // include our three main classes 33 33 require_once( plugin_dir_path( __FILE__ ) . 'class-SH-Crafty-Social-Buttons-Plugin.php' ); 34 34 require_once( plugin_dir_path( __FILE__ ) . 'class-SH-Crafty-Social-Buttons-Shortcode.php' ); -
crafty-social-buttons/trunk/css/admin.min.css
r1001035 r1011972 1 1 /*! crafty-social-buttons (c) Sarah Henderson 2014 2 * Version 1.3. 7 (03-10-2014) */2 * Version 1.3.8 (22-10-2014) */ 3 3 4 4 .crafty-social-buttons .csb-include-list{border:1px solid #ddd;background:#f1f1f1;margin-right:.5em;vertical-align:top;padding:.4em}.crafty-social-buttons .include-heading{text-align:left;font-weight:700}.crafty-social-buttons .csb-include-list ul{border:1px solid #ddd;background:#fff;padding:.5em;margin:0;min-height:60px}.crafty-social-buttons .csb-include-list ul li{display:inline-block;padding:0;margin:.3em;text-align:center;font-size:1.2em;cursor:move}.crafty-social-buttons .csb-image-preview{margin-top:.5em}.crafty-social-buttons select{width:200px}.crafty-social-buttons input[type=text]{width:350px}.crafty-social-buttons span.description{font-style:normal}.crafty-social-buttons span.description strong{font-style:italic} -
crafty-social-buttons/trunk/css/public.min.css
r1001035 r1011972 1 1 /*! crafty-social-buttons (c) Sarah Henderson 2014 2 * Version 1.3. 7 (03-10-2014) */2 * Version 1.3.8 (22-10-2014) */ 3 3 4 4 div.crafty-social-buttons{margin:.3em 0;clear:both}div.crafty-social-buttons-align-left{text-align:left}div.crafty-social-buttons-align-center{text-align:center}div.crafty-social-buttons-align-right{text-align:right}div.crafty-social-buttons .crafty-social-caption{display:inline-block;padding-right:1em;vertical-align:top;font-size:1.2em}div.crafty-social-buttons-caption-block .crafty-social-caption{display:block;padding-right:0}div.crafty-social-buttons ul{display:inline-block;list-style-type:none;margin:0;padding:0}div.crafty-social-buttons ul li{display:inline-block;margin:0 .2em;padding:0}div.crafty-social-buttons .crafty-social-share-count:after,div.crafty-social-buttons .crafty-social-share-count:before{right:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute}div.crafty-social-buttons .crafty-social-share-count:after{border-color:transparent #f5f5f5 transparent transparent;border-width:5px;top:50%;margin-top:-5px}div.crafty-social-buttons .crafty-social-share-count:before{border-color:transparent #e0dddd transparent transparent;border-width:6px;top:50%;margin-top:-6px}div.crafty-social-buttons .crafty-social-share-count{font:18px Arial,Helvetica,sans-serif;color:#555e58;padding:5px;-khtml-border-radius:6px;-o-border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;position:relative;background:#f5f5f5;border:1px solid #e0dddd;display:inline-block;vertical-align:top;margin-left:2px;min-width:24px;text-align:center}div.crafty-social-buttons.crafty-social-buttons-size-2 .crafty-social-share-count{min-width:14px;font-size:12px}div.crafty-social-buttons.crafty-social-buttons-size-3 .crafty-social-share-count{min-width:16px;font-size:14px}div.crafty-social-buttons.crafty-social-buttons-size-4 .crafty-social-share-count{min-width:20px;font-size:16px}div.crafty-social-buttons.crafty-social-buttons-size-5 .crafty-social-share-count{min-width:24px;font-size:18px}div.crafty-social-buttons.crafty-social-buttons-size-6 .crafty-social-share-count{min-width:24px;font-size:20px} -
crafty-social-buttons/trunk/help/about-me-tab.php
r801913 r1011972 1 1 <p><strong>About Me</strong></p> 2 2 3 <p>Made with love by <a href="http://sarahhenderson.info">Sarah Henderson</a>, a freelance web developer from New Zealand.</p> 4 <p>I recently learned to crochet and thought of starting up a crochet related blog to show off my new creations. I got a bit sidetracked making pretty icons and WordPress plugins and thought that others in the crafty community might want to use them too.</p> 5 <p>I have also created a WordPress plugin that creates a 'Pattern' post type with all the sections you normally find in a pattern. I hope to make that available also soon.</p> 3 <p>Made with love by <a href="http://sarahhenderson.info">Sarah Henderson</a>, 4 a freelance web developer from New Zealand.</p> 5 <p>I recently learned to crochet and thought of starting up a crochet related blog to show 6 off my new creations. I got a bit sidetracked making pretty icons and WordPress plugins 7 and thought that others in the crafty community might want to use them too.</p> 6 8 7 9 <p>For more information about this plugin, please visit 8 10 <a href="http://sarahhenderson.github.io/Crafty-Social-Buttons">the plugin's website.</a> 9 11 10 <p>I really hope you find this plugin useful. Please don't hesitate to <a href="mailto:[email protected]">contact me</a> with any issues you have, or any requests for new features. If you want to contribute towards it's further development, (or you just want to say thank you), you can <a href="http://sarahhenderson.info/buy-me-a-coffee">buy me a coffee</a>. 12 <p>I really hope you find this plugin useful. Please don't hesitate to 13 <a href="mailto:[email protected]">contact me</a> with any issues you have, 14 or any requests for new features. If you want to contribute towards its further 15 development, (or you just want to say thank you), you can 16 <a href="http://sarahhenderson.info/buy-me-a-coffee">buy me a coffee</a>. -
crafty-social-buttons/trunk/help/action-hook-tab.php
r952089 r1011972 5 5 <li><code><?php do_action('crafty_social_share_buttons'); ?></code></strong></li> 6 6 <li><code><?php do_action('crafty_social_link_buttons'); ?></code></strong></li> 7 <li><code><?php do_action('crafty-social-share-page-buttons'); ?></code> </li>7 <li><code><?php do_action('crafty-social-share-page-buttons'); ?></code> (for use outside the loop)</li> 8 8 </ul> 9 9 -
crafty-social-buttons/trunk/help/link-tab.php
r819149 r1011972 14 14 15 15 <dt>User IDs</dt> 16 <dd>For any service you choose, you should enter your username in the box. This is so the link will go directly to your profile (e.g. your facebook page, your Etsy shop) and not just to the homepage of the site.</dd> 16 <dd>For any service you choose, you should enter your username in the box and the URL to your page will 17 be automatically generated. If you do not have a standard URL (e.g. you have a custom or store URL) 18 just enter the full url (starting with http://) in the box.</dd> 17 19 18 <dt> Craftsy Links</dt>19 <dd> There are three ways to link to your Craftsy profile.20 <ol> 21 <li><strong>User profile</strong>. The link will be in this form: www.craftsy.com/user/<strong>user-id/</strong>. You should enter just your user ID (all numbers).</li> 22 <li><strong>Pattern store</strong>. The link will be in this form: www.craftsy.com/user/<strong>user-id/pattern-store</strong>. You should enter <code>user-id/pattern-store</code> (e.g. 12345/pattern-store). The user-id part will be all numbers. </li>23 <li><strong>Instructor profile</strong>. The link will be in this form: www.craftsy.com/<strong>instructors/user-id</strong>/. You should enter <code>/instructors/user-id</code>. The user-id will be a combination of letters and numbers</li>24 </ol> 20 <dt>Specific Feeds</dt> 21 <dd><a href="http://www.specificfeeds.com/rss">SpecificFeeds</a> is a free service which allows 22 your visitors to subscribe to your blog by RSS or Email. 23 No configuration is necessary - your visitors will be automatically linked to the Specific Feeds 24 follow page (<a href="http://www.specificfeeds.com/follow">http://www.specificfeeds.com/follow</a>). 25 You can also generate a unique subscription url for your 26 blog <a href="http://www.specificfeeds.com/rss">here</a>. 25 27 </dd> 26 28 <p>Done forget to hit <em>Save changes</em> when you're done!</p> -
crafty-social-buttons/trunk/js/admin.min.js
r1001035 r1011972 1 1 /*! crafty-social-buttons (c) Sarah Henderson 2014 2 * Version 1.3. 7 (03-10-2014) */2 * Version 1.3.8 (22-10-2014) */ 3 3 jQuery(document).ready(function(a){a("#csbsort1, #csbsort2").sortable({connectWith:".connectedSortable",update:function(){var b;b=a("#csbsort2 li").map(function(){return a(this).attr("id")}).get(),a(".csb-services").val(b)}}).disableSelection(),a(".csb-services").val(a("#csbsort2 li").map(function(){return a(this).attr("id")}).get()),a(".csb-image-set").change(function(){var b=a(this).val();a.each(a(".csb-services img"),function(c,d){var e=a(d).attr("data-url"),f=a(d).attr("data-alt-url"),g=a(d).attr("data-filename"),h=e+b+"/"+g,i=f+b+"/"+g;a(d).attr("src",h),a(d).attr("data-image-set",b),a.ajax(h,{method:"get",error:function(){a(d).attr("src",i)}})})}),a("#share_image_size").bind("input",function(){var b=a(this).val();a.each(a(".csb-services img"),function(c,d){a(d).attr("width",b),a(d).attr("height",b)})}),a("#link_image_size").bind("input",function(){var b=a(this).val();a.each(a(".csb-services img"),function(c,d){a(d).attr("width",b),a(d).attr("height",b)})})}); -
crafty-social-buttons/trunk/js/public.min.js
r1001035 r1011972 1 1 /*! crafty-social-buttons (c) Sarah Henderson 2014 2 * Version 1.3. 7 (03-10-2014) */2 * Version 1.3.8 (22-10-2014) */ 3 3 jQuery(document).ready(function(a){var b=[];for(var c in window)0===c.indexOf("crafty_social_buttons_data_")&&b.push(window[c]);for(var d=function(b,c,d,e){var f=d+"&service="+b+"&key="+e;"page"==e&&(f+="&url="+c);var g=b.toLowerCase();a.ajax(f,{cache:!1,type:"get",dataType:"json",contentType:"application/json",success:function(b){b&&b.count&&($count=a(".crafty-social-share-count-"+g+"-"+e),$count.html(b.count),$count.show())},error:function(){}})},e=0,f=b.length;f>e;e++)for(var g=b[e],h=g.url,i=g.callbackUrl,c=g.key,j=0,k=g.services.length;k>j;j++){var l=g.services[j];d(l,h,i,c)}var m=function(a){var b="height=400,width=640";return a.indexOf("ravelry.com")>-1&&(b="fullscreen=yes"),newwindow=window.open(a,"share",b+",resizable=yes"),window.focus&&newwindow.focus(),!1},n=a(".crafty-social-buttons a.popup");a.each(n,function(b,c){a(c).hasClass("csb-email")||a(c).hasClass("csb-pinterest")||(c.onclick=function(){return m(this.href)})})}); -
crafty-social-buttons/trunk/services/class-SH_Craftsy.php
r975000 r1011972 43 43 return __('Hint','crafty-social-buttons').": www.craftsy.com/user/<strong>user-id</strong>/ (" 44 44 . __('numbers','crafty-social-buttons') .')' 45 . __(' For more options see Help > Link Buttons (link top right of screen)','crafty-social-buttons');45 . __('To link to pattern store or instructor page, enter the full url.','crafty-social-buttons'); 46 46 } 47 47 } 48 ?> -
crafty-social-buttons/trunk/services/class-SH_Digg.php
r975000 r1011972 35 35 } 36 36 } 37 ?> -
crafty-social-buttons/trunk/services/class-SH_Email.php
r982892 r1011972 16 16 $this->imageUrl = $this->imagePath . "email.png"; 17 17 $this->message = isset($settings['email_body']) ? $settings['email_body'] : ''; 18 $this->newWindow = false; 18 19 } 19 20 … … 29 30 return $url; 30 31 } 31 32 32 33 public static function description() { 33 34 return __('Hint: Your email address','crafty-social-buttons'); 34 35 } 35 36 } 36 ?> -
crafty-social-buttons/trunk/services/class-SH_Etsy.php
r975000 r1011972 40 40 } 41 41 } 42 ?> -
crafty-social-buttons/trunk/services/class-SH_Facebook.php
r1001035 r1011972 60 60 } 61 61 } 62 ?> -
crafty-social-buttons/trunk/services/class-SH_Flickr.php
r975000 r1011972 40 40 } 41 41 } 42 43 ?> -
crafty-social-buttons/trunk/services/class-SH_Google.php
r975854 r1011972 84 84 } 85 85 } 86 87 ?> -
crafty-social-buttons/trunk/services/class-SH_Instagram.php
r975000 r1011972 40 40 41 41 } 42 43 ?> -
crafty-social-buttons/trunk/services/class-SH_LinkedIn.php
r975854 r1011972 59 59 } 60 60 } 61 62 ?> -
crafty-social-buttons/trunk/services/class-SH_Pinterest.php
r977290 r1011972 18 18 19 19 public function shareButton($url, $title = '', $showCount = false) { 20 21 $html = "<a class=\"" . $this->cssClass() . "\" href='javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());'>";22 20 23 $html .= $this->buttonImage(); 21 $linkTitle = $this->getShareButtonTitle(); 22 23 $html = "<a title=\"" . $linkTitle . "\" class=\"" . $this->cssClass() . "\" href='javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());'>"; 24 25 $html .= $this->buttonImage($linkTitle); 24 26 25 27 $html .= $this->shareCountHtml($showCount); … … 65 67 } 66 68 } 67 68 ?> -
crafty-social-buttons/trunk/services/class-SH_RSS.php
r975000 r1011972 31 31 } 32 32 33 public function getLinkButtonTitle() { 34 return "Subscribe via RSS"; 35 } 36 33 37 public static function description() { 34 38 return __('Hint: enter full url for feed service (including http://) or leave blank to use built-in WordPress RSS feed url','crafty-social-buttons'); … … 36 40 37 41 } 38 39 ?> -
crafty-social-buttons/trunk/services/class-SH_Ravelry.php
r975000 r1011972 41 41 } 42 42 } 43 44 ?> -
crafty-social-buttons/trunk/services/class-SH_Reddit.php
r975854 r1011972 56 56 } 57 57 } 58 59 ?> -
crafty-social-buttons/trunk/services/class-SH_Social_Service.php
r975854 r1011972 58 58 public function shareButton($url, $title = '', $showCount = false) { 59 59 60 $service_url = esc_url($this-> shareButtonUrl($url, $title)); 60 $url = esc_url($this-> shareButtonUrl($url, $title)); 61 $buttonTitle = $this->getShareButtonTitle(); 62 return $this->generateButtonHtml($url, $buttonTitle, $showCount); 63 } 61 64 62 $html = '<a class="' . $this->cssClass() . '" href="' . $service_url . '" ' 65 66 public function linkButton($username) { 67 68 $url = esc_url($this->linkButtonUrl($username)); 69 $buttonTitle = $this->getLinkButtonTitle(); 70 return $this->generateButtonHtml($url, $buttonTitle, false); 71 } 72 73 private function generateButtonHtml($url, $title = '', $showCount = false) { 74 75 $html = '<a href="' . $url . '"' 76 . ' class="' . $this->cssClass() .'"' 77 . ' title="' . $title . '" ' 63 78 . ($this->newWindow ? 'target="_blank"' : '') . '>'; 64 79 65 $html .= $this->buttonImage( );80 $html .= $this->buttonImage($title); 66 81 67 82 if ($this->hasShareCount()) { … … 74 89 } 75 90 76 77 public function linkButton($username) {78 79 $url = esc_url($this->linkButtonUrl($username));80 81 $html = '<a class="' . $this->cssClass()82 . '" href="'. $url. '" ' .83 ($this->newWindow ? 'target="_blank"' : '') . '>';84 85 $html .= $this->buttonImage();86 87 $html .= '</a>';88 89 return $html;90 }91 92 91 public function shareCount($url) { 93 92 return 0; 94 93 } 95 94 95 public function getShareButtonTitle() { 96 return __("Share via ", 'crafty-social-buttons') . $this->service; 97 } 98 public function getLinkButtonTitle() { 99 return $this->service; 100 } 96 101 public static function canShare() { 97 102 return true; … … 110 115 } 111 116 112 protected function buttonImage( ) {117 protected function buttonImage($title = '') { 113 118 $imageUrl = $this->imagePath . trim(strtolower($this->service)) . $this->imageExtension; 114 return '<img title="'.$this->service.'"'115 .' alt="'.$this->service.'"'116 .' width="'.$this->imageSize.'"'117 .' height="'.$this->imageSize.'"'118 .' src="' . $imageUrl .'" />';119 return '<img ' 120 .' alt="'.$title.'"' 121 .' width="'.$this->imageSize.'"' 122 .' height="'.$this->imageSize.'"' 123 .' src="' . $imageUrl .'" />'; 119 124 } 120 125 … … 131 136 132 137 } 133 134 ?> -
crafty-social-buttons/trunk/services/class-SH_StumbleUpon.php
r975854 r1011972 55 55 } 56 56 } 57 ?> -
crafty-social-buttons/trunk/services/class-SH_Tumblr.php
r975000 r1011972 43 43 } 44 44 } 45 46 ?> -
crafty-social-buttons/trunk/services/class-SH_Twitter.php
r975854 r1011972 62 62 } 63 63 } 64 65 ?> -
crafty-social-buttons/trunk/services/class-SH_YouTube.php
r975000 r1011972 40 40 41 41 } 42 43 ?> -
crafty-social-buttons/trunk/views/admin.php
r975000 r1011972 1 <div class="wrap <?php echo $this->plugin_slug; ?>">1 <div class="wrap <?php echo $this->plugin_slug; ?>"> 2 2 <h2><?php _e('Crafty Social Buttons', $this->plugin_slug); ?></h2> 3 3 -
crafty-social-buttons/trunk/views/widget.php
r801913 r1011972 1 <p>1 <p> 2 2 <label for="<?php echo $this->get_field_id('buttonType'); ?>">Type:</label> 3 3
Note: See TracChangeset
for help on using the changeset viewer.