WordPress.org

Plugin Directory

Changeset 577436


Ignore:
Timestamp:
07/26/12 00:06:46 (6 years ago)
Author:
MarijnRongen
Message:

Tagging version 2.1.0

Location:
social-sharing-toolkit
Files:
18 added
18 deleted
50 edited
16 copied

Legend:

Unmodified
Added
Removed
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.500px.php

    r575825 r577436  
    1010        $url = 'http://500px.com/'.$id; 
    1111        $text = ($text == '') ? __('My portfolio on','mr_social_sharing_toolkit').' 500px' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.buffer.php

    r575825 r577436  
    4545                break; 
    4646        }        
    47         return $retval; 
     47        return $retval.' <span>'.get_option('mr_social_sharing_js_footer').'</span>'; 
    4848    } 
    4949} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.deviantart.php

    r575825 r577436  
    1010        $url = 'http://'.$id.'.deviantart.com/'; 
    1111        $text = ($text == '') ? __('My deviantArt','mr_social_sharing_toolkit') : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.facebook.php

    r575825 r577436  
    6969        $lang = __('en_US','mr_social_sharing_toolkit'); 
    7070        $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    71         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     71        $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__), $footer); 
    7272        $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
    73         return $retval; 
     73        return '<span style="display: inline-block; width: '.$width.'px; height: '.$height.'px; overflow: hidden;">'.$retval.'</span>'; 
    7474    } 
    7575                 
    7676    function fb_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {    
    77         $lang = __('en_US','mr_social_sharing_toolkit'); 
    7877        switch ($type) { 
    7978            case 'vertical': 
    8079                $retval = '<fb:share-button type="box_count" href="'.$url.'"></fb:share-button>'; 
    8180                //$retval = '<a name="fb_share" type="box_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    82         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     81                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    8382                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    84                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     83                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    8584                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    8685                break; 
     
    8887                $retval = '<fb:share-button type="button_count" href="'.$url.'"></fb:share-button>'; 
    8988                //$retval = '<a name="fb_share" type="button_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    90         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     89                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    9190                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    92                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     91                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    9392                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    9493                break; 
     
    9695                $retval = '<fb:share-button type="button" href="'.$url.'"></fb:share-button>'; 
    9796                //$retval = '<a name="fb_share" type="button" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    98         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     97                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    9998                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    100                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     99                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    101100                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    102101                break; 
     
    123122        $url = 'http://www.facebook.com/'.$id; 
    124123        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Facebook' : $text; 
    125         return $this->get_icon($type, $url, $text, $icon); 
     124        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     125        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    126126    } 
    127127} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.flickr.php

    r575825 r577436  
    1010        $url = 'http://www.flickr.com/photos/'.$id; 
    1111        $text = ($text == '') ? __('My photostream on','mr_social_sharing_toolkit').' Flickr' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.goodreads.php

    r575825 r577436  
    1010        $url = 'http://goodreads.com/profile/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Goodreads' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.googleplus.php

    r575825 r577436  
    99     
    1010    function gl_plus($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') { 
    11         $retval = '<g:plusone'; 
    1211        switch ($type) { 
    1312            case 'horizontal': 
     
    3837        $url = 'http://plus.google.com/'.$id; 
    3938        $text = ($text == '') ? __('Add me to your circles','mr_social_sharing_toolkit') : $text; 
    40         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4141    } 
    4242} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.hyves.php

    r575825 r577436  
    1616        $url = 'http://'.$id.'.hyves.nl'; 
    1717        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Hyves' : $text; 
    18         return $this->get_icon($type, $url, $text, $icon); 
     18        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     19        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1920    } 
    2021} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.lastfm.php

    r575825 r577436  
    1010        $url = 'http://www.last.fm/user/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Last.fm' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    }    
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.linkedin.php

    r575825 r577436  
    3939        $url = 'http://www.linkedin.com/in/'.$id; 
    4040        $text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    41         return $this->get_icon($type, $url, $text, $icon); 
     41        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     42        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4243    } 
    4344     
     
    4546        $url = 'http://www.linkedin.com/company/'.$id; 
    4647        $text = ($text == '') ? __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    47         return $this->get_icon($type, $url, $text, $icon); 
     48        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     49        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4850    } 
    4951     
     
    5153        $url = 'http://www.linkedin.com/groups?gid='.$id; 
    5254        $text = ($text == '') ? __('Join my group on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    53         return $this->get_icon($type, $url, $text, $icon); 
     55        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     56        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    5457    } 
    5558} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.myspace.php

    r575825 r577436  
    1717        $url = 'http://www.myspace.com/'.$id; 
    1818        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Myspace' : $text; 
    19         return $this->get_icon($type, $url, $text, $icon); 
     19        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     20        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    2021    } 
    2122} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.picasa.php

    r575825 r577436  
    1010        $url = 'http://picasaweb.google.com/'.$id; 
    1111        $text = ($text == '') ? __('My Picasa Web Albums','mr_social_sharing_toolkit') : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.pinterest.php

    r575825 r577436  
    3737        $url = 'http://pinterest.com/'.$id.'/'; 
    3838        $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Pinterest' : $text; 
    39         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4041    } 
    4142} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.rss.php

    r575825 r577436  
    1010        $url = $id; 
    1111        $text = ($text == '') ? 'RSS Feed' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.soundcloud.php

    r575825 r577436  
    1010        $url = 'http://soundcloud.com/'.$id; 
    1111        $text = ($text == '') ? __('My sounds on','mr_social_sharing_toolkit').' Soundcloud' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.spotify.php

    r575825 r577436  
    1010        $url = 'http://open.spotify.com/user/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Spotify' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.tumblr.php

    r575825 r577436  
    1717        $url = 'http://'.$id.'.tumblr.com'; 
    1818        $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Tumblr' : $text; 
    19         return $this->get_icon($type, $url, $text, $icon); 
     19        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     20        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    2021    } 
    2122} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.twitter.php

    r575825 r577436  
    5353                $this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer); 
    5454                break; 
     55            case 'none': 
     56                $retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="'.$url.'"'; 
     57                if ($id != '') { 
     58                    $retval .= ' data-via="'.$id.'"'; 
     59                } 
     60                if ($count_url != '') { 
     61                    $retval .= ' data-counturl="'.$count_url.'"';    
     62                } 
     63                $retval .= ' data-text="'.$title.'">Tweet</a>'; 
     64                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
     65                $this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer); 
     66                break; 
    5567            default: 
    5668                $url = 'https://twitter.com/share?url='.urlencode($url).'&amp;text='.urlencode($title); 
     
    8395                $url = 'https://twitter.com/'.$id; 
    8496                $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Twitter' : $text; 
    85                 $retval = $this->get_icon($type, $url, $text, $icon); 
     97                $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     98                $retval = $this->get_icon($type, $url, $text, $icon, false, $blank); 
    8699                break;   
    87100        } 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.xing.php

    r575825 r577436  
    1313                $retval = '<script type="XING/Share" data-counter="right" data-lang="en" data-url="'.$url.'"></script>';                 
    1414                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    15                 $this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', $footer); 
     15                $this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', false); 
    1616                break; 
    1717            case 'vertical': 
     
    3737        $url = 'http://www.xing.com/profile/'.$id; 
    3838        $text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' Xing' : $text; 
    39         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4041    } 
    4142} 
  • social-sharing-toolkit/tags/2.1.0/includes/buttons/button.youtube.php

    r575825 r577436  
    1010        $url = 'http://www.youtube.com/user/'.$id; 
    1111        $text = ($text == '') ? __('Watch me on','mr_social_sharing_toolkit').' YouTube' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/tags/2.1.0/includes/class.button.php

    r575825 r577436  
    55    protected $title; 
    66    protected $icon; 
     7    protected $scripts; 
    78     
    89    function MR_Social_Sharing_Toolkit_Button() { 
     
    1112        $this->title = ''; 
    1213        $this->icon = ''; 
     14        $this->scripts = array(); 
    1315    } 
    1416     
     
    8183     
    8284    function enqueue_script($name, $src, $footer = false) { 
    83         if ($footer) { 
    84             wp_enqueue_script($name, $src, array(), false, true); 
    85         } else { 
    86             wp_enqueue_script($name, $src); 
    87         } 
     85        $this->scripts[] = array('name' => $name, 'src' => $src, 'in_footer' => $footer); 
     86    } 
     87     
     88    function get_enqueued_scripts() { 
     89        return $this->scripts;   
    8890    } 
    8991} 
  • social-sharing-toolkit/tags/2.1.0/readme.txt

    r575825 r577436  
    44Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Buffer, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph 
    55Requires at least: 3.0 
    6 Tested up to: 3.3.1 
    7 Stable tag: 2.0.9 
     6Tested up to: 3.4.1 
     7Stable tag: 2.1.0 
    88License: GPLv2 or later 
    99 
     
    8181* 500px 
    8282* Picasa 
     83* Instagram 
    8384* DeviantArt 
    8485* Last.fm 
     
    166167== Upgrade Notice == 
    167168 
     169= 2.1.0 = 
     170 
     171Please update to version 2.1.0 immediately for several crucial fixes. 
     172 
    168173= 2.0.9 = 
    169174 
     
    222227 
    223228== Changelog == 
     229 
     230= 2.1.0 = 
     231* Includes a fix for intrusive p-tag inclusion by some themes (thanks to Pia and Patrick for helping to debug this) 
     232* Replaced the Twitter icons 
     233* Included link to settings page in Plugins page of WP Admin 
     234* Added Instagram buttons (using Webstagram) 
     235* Added possibility to force follow links to open in new window / tab 
     236* Fixed slight overlap in WP admin when using IE8 
     237* Removed some redundant functions 
    224238 
    225239= 2.0.9 = 
  • social-sharing-toolkit/tags/2.1.0/social_sharing_toolkit.php

    r575825 r577436  
    44Plugin URI: http://www.active-bits.nl/support/social-sharing-toolkit/ 
    55Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable. 
    6 Version: 2.0.9 
     6Version: 2.1.0 
    77Author: Marijn Rongen 
    88Author URI: http://www.active-bits.nl 
     
    1717    var $follow_buttons; 
    1818    var $error; 
     19    var $scripts; 
    1920     
    2021    function MR_Social_Sharing_Toolkit() { 
    2122        $this->count = 0; 
    2223        $this->error = ''; 
     24        $this->scripts = array(); 
    2325        load_plugin_textdomain( 'mr_social_sharing_toolkit', false, dirname(plugin_basename(__FILE__)).'/languages/'); 
    2426        /* Declare button types */ 
     
    8991        $bitly_options = array('enable' => 0, 'username' => '', 'key' => '', 'cache' => array()); 
    9092        $opengraph_options = array('enable' => 0, 'default_image' => '', 'fixed_image' => 0); 
    91         $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options, 'mr_social_sharing_custom_css' => ''); 
     93        $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_follow_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options, 'mr_social_sharing_custom_css' => ''); 
    9294        foreach ($this->options as $key => $val) { 
    9395            $this->options[$key] = get_option( $key, $val ); 
     
    172174        add_options_page('Social Sharing', 'Social Sharing Toolkit', 'manage_options', 'mr_social_sharing', array($this, 'plugin_admin_page')); 
    173175        add_filter('plugin_row_meta', array('MR_Social_Sharing_Toolkit', 'plugin_links'),10,2); 
    174         wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin.css', __FILE__)); 
    175         wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin.js', __FILE__)); 
    176176        wp_enqueue_script('jquery-ui-tabs'); 
    177177        wp_enqueue_script('jquery-ui-sortable'); 
     178        wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin_2.1.0.css', __FILE__)); 
     179        wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin_2.1.0.js', __FILE__)); 
    178180    } 
    179181     
     
    181183        if ($file == plugin_basename(__FILE__)) { 
    182184            $links[] = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">'.__('Donate','mr_social_sharing_toolkit').'</a>'; 
     185            $links[] = '<a href="/wp-admin/options-general.php?page=mr_social_sharing">'.__('Settings').'</a>'; 
    183186        } 
    184187        return $links; 
     
    256259                            echo ' 
    257260                            <br/> 
    258                             <label for="mr_social_sharing_enable_shortcode" class="check"><input type="checkbox" name="mr_social_sharing_enable_shortcode" id="mr_social_sharing_enable_shortcode"'; 
    259         if ($this->options['mr_social_sharing_enable_shortcode'] == 1) {    echo ' checked="checked"';}  
    260         echo ' value="1" /> '.__('Enable shortcode').'</label><br/> 
     261                            <input type="hidden" name="mr_social_sharing_enable_shortcode" value="1" /> 
    261262                            <p><span class="description"> '.__('Use the shortcode [social_share/] where you want the buttons to appear', 'mr_social_sharing_toolkit').'</span></p> 
    262263                            <label for="mr_social_sharing_include_excerpts" class="check"><input type="checkbox" name="mr_social_sharing_include_excerpts" id="mr_social_sharing_include_excerpts"'; 
     
    306307        $this->showListAdmin($this->follow_buttons, 'follow_'); 
    307308        echo ' 
     309                        <label for="mr_social_sharing_follow_new" class="check"><input type="checkbox" name="mr_social_sharing_follow_new" id="mr_social_sharing_follow_new"'; 
     310        if ($this->options['mr_social_sharing_follow_new'] == 1) { echo ' checked="checked"';} 
     311        echo ' value="1" /> '.__("Open links in new window or tab", 'mr_social_sharing_toolkit').'</label>       
    308312                    </div> 
    309313                    <div id="tab_5" class="mr_social_sharing_networks"> 
    310                         <h3>'.__('Advanced settings','mr_social_sharing_toolkit').'</h3> 
     314                        <h3>'.__('Advanced settings','mr_social_sharing_toolkit').'</h3>                                         
    311315                        <h4>'.__('Automatic Twitter links','mr_social_sharing_toolkit').'</h4> 
    312316                        <p>'.__('Select what you want to convert:','mr_social_sharing_toolkit').'</p> 
     
    472476        $banners = array(); 
    473477        // ElegantThemes: 
    474         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    475         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    476         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    477         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     478        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     479        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     480        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     481        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    478482        // WooThemes: 
    479         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l104" target="_blank"><img src="http://www.woothemes.com/ads/wc_468x60_grey.png" /></a>'; 
    480         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l102" target="_blank"><img src="http://www.woothemes.com/ads/wc_468x60_3_grey.png" /></a>'; 
    481         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l44" target="_blank"><img src="http://woothemes.com/ads/468x60c.jpg" /></a>'; 
    482         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l43" target="_blank"><img src="http://woothemes.com/ads/468x60b.jpg" /></a>'; 
     483        $banners[] = '<a href="http://woothemes.zferral.com/l/53/33738" title=""><img src="http://woothemes.zferral.com/m/53" alt="" title="" style="border: none"   /></a>';             
     484        $banners[] = '<a href="http://woothemes.zferral.com/l/32/33738" title=""><img src="http://woothemes.zferral.com/m/32" alt="" title="" style="border: none"   /></a>';                        
    483485        // Mojo Themes: 
    484486        $banners[] = '<a href="http://www.mojo-themes.com/categories/wordpress/?r=mrongen" target="_blank"><img src="'.plugins_url('/banners/mojo_1.jpg', __FILE__).'" /></a>'; 
     
    503505     
    504506    function print_opengraph() { 
    505         echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.0.9 --> 
     507        echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.1.0 --> 
    506508        <meta property="og:locale" content="'.str_replace('-', '_', get_bloginfo('language')).'"/>'; 
    507509        if (is_single() || is_page()) { 
     
    531533            if ($this->options['mr_social_sharing_opengraph']['default_image'] != '') { 
    532534                echo '           
    533             <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
     535        <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
    534536            } 
    535537        } else { 
     
    553555            if ($media != '') { 
    554556                echo '           
    555             <meta property="og:image" content="'.$media.'"/>'; 
     557        <meta property="og:image" content="'.$media.'"/>'; 
    556558            } elseif ($this->options['mr_social_sharing_opengraph']['default_image'] != '') { 
    557559                echo '           
    558             <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
     560        <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
    559561            } 
    560562        } 
     
    562564     
    563565    function prepare_styles() { 
    564         wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__)); 
     566        wp_enqueue_style('mr_social_sharing', plugins_url('/style_2.1.0.css', __FILE__)); 
    565567        $upload = wp_upload_dir(); 
    566568        if (file_exists($upload['basedir'].'/social_sharing_custom.css') && $this->options['mr_social_sharing_custom_css'] != '') { 
     
    569571    } 
    570572     
    571     function prepare_scripts() {         
     573    function prepare_scripts() { 
    572574        if ($this->options['mr_social_sharing_no_follow'] == 1) { 
    573575            if ($this->options['mr_social_sharing_js_footer'] == 1) { 
    574                 wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery'), false, true); 
     576                wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow_2.1.0.js', __FILE__), array('jquery'), false, true); 
    575577            } else { 
    576                 wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery')); 
     578                wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow_2.1.0.js', __FILE__), array('jquery')); 
    577579            } 
    578580        } else { 
    579581            if ($this->options['mr_social_sharing_js_footer'] == 1) { 
    580                 wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'), false, true); 
     582                wp_enqueue_script('mr_social_sharing', plugins_url('/script_2.1.0.js', __FILE__), array('jquery'), false, true); 
    581583            } else { 
    582                 wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery')); 
    583             } 
    584         } 
    585     } 
     584                wp_enqueue_script('mr_social_sharing', plugins_url('/script_2.1.0.js', __FILE__), array('jquery')); 
     585            } 
     586        } 
     587        $this->load_scripts(); 
     588        if (is_array($this->scripts) && count($this->scripts) > 0) { 
     589            foreach ($this->scripts as $script) { 
     590                wp_enqueue_script($script['name'], $script['src'], array(), false, $script['in_footer']); 
     591            }    
     592        } 
     593    }    
     594     
     595    function load_scripts() { 
     596        $types = array('', 'shortcode_', 'widget_'); 
     597        foreach ($types as $type) { 
     598            foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) { 
     599                if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) { 
     600                    $id = (array_key_exists('id', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['id'] : ''; 
     601                    $text = (array_key_exists('text', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_'.$type.'buttons'][$button]['text']) : ''; 
     602                    $icon = (array_key_exists('icon', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['icon'] : ''; 
     603                    foreach ($this->buttons as $tmp) { 
     604                        if (method_exists($tmp, $button)) {          
     605                            $tmp->$button('','', $this->options['mr_social_sharing_'.$type.'buttons'][$button]['type'], $id, '', '', $text, $icon); 
     606                            if (is_array($tmp->get_enqueued_scripts())) { 
     607                                $this->scripts = array_merge($this->scripts, $tmp->get_enqueued_scripts());  
     608                            } 
     609                        } 
     610                    } 
     611                } 
     612            } 
     613        }    
     614        foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) { 
     615            if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) { 
     616                $id = (array_key_exists('id', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['id'] : ''; 
     617                $text = (array_key_exists('text', $this->options['mr_social_sharing_follow_buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_follow_buttons'][$button]['text']) : ''; 
     618                $icon = (array_key_exists('icon', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['icon'] : ''; 
     619                foreach ($this->buttons as $tmp) { 
     620                    if (method_exists($tmp, $button)) {          
     621                        $tmp->$button($this->options['mr_social_sharing_follow_buttons'][$button]['type'], $id, $text, $icon); 
     622                        if (is_array($tmp->get_enqueued_scripts())) { 
     623                            $this->scripts = array_merge($this->scripts, $tmp->get_enqueued_scripts());  
     624                        } 
     625                    } 
     626                }                
     627            } 
     628        } 
     629    }    
    586630     
    587631    function create_bookmarks($url = '', $title = '', $type = '', $media = '', $description = '') { 
     
    594638        $bookmarks = ' 
    595639                <div class="mr_social_sharing_wrapper"> 
    596                 <!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
     640                <!-- Social Sharing Toolkit v2.1.0 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
    597641        foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) { 
    598642            if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) { 
     
    606650        $bookmarks = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $bookmarks); 
    607651        $this->count++; 
     652        echo 'bookmarks'; 
    608653        return $bookmarks;   
    609654    } 
     
    612657        $followers = ' 
    613658                <div class="mr_social_sharing_wrapper"> 
    614                 <!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
     659                <!-- Social Sharing Toolkit v2.1.0 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
    615660        foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) { 
    616661            if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) { 
     
    623668        $followers .= '</div>'; 
    624669        $followers = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $followers); 
     670        echo 'follow'; 
    625671        return $followers; 
    626672    } 
     
    648694                if (method_exists($tmp, $button)) {          
    649695                    $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$tmp->$button($type, $id, $text, $icon).'</'.$display.'>'; 
    650                 } 
     696                }                
    651697            } 
    652698        } 
     
    768814    } 
    769815     
    770     function should_use_shortcode() { 
    771         if ($this->options['mr_social_sharing_enable_shortcode'] == 1) { 
    772             return true; 
    773         } 
    774         return false;    
    775     } 
    776      
    777816    function share_shortcode() { 
    778817        if (is_feed()) { 
     
    805844            $type = get_post_type(); 
    806845            $bookmarks = '';         
    807             if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1)) { 
     846            if ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1) { 
    808847                $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), 'shortcode_', $media, ''); 
    809848            } 
     
    857896$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit(); 
    858897add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu')); 
    859 add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles')); 
    860 add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts')); 
    861898if ($MR_Social_Sharing_Toolkit->should_print_opengraph()) {  
    862899    add_action('wp_head', array($MR_Social_Sharing_Toolkit, 'print_opengraph'), 1); 
     
    874911    add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'share')); 
    875912} 
    876 if ($MR_Social_Sharing_Toolkit->should_use_shortcode()) { 
    877     add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode')); 
    878 } 
     913add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'), 15); 
     914add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles'), 50); 
     915add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts'), 50); 
    879916include 'includes/share.widget.php'; 
    880917include 'includes/follow.widget.php'; 
  • social-sharing-toolkit/trunk/includes/buttons/button.500px.php

    r575825 r577436  
    1010        $url = 'http://500px.com/'.$id; 
    1111        $text = ($text == '') ? __('My portfolio on','mr_social_sharing_toolkit').' 500px' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.buffer.php

    r575825 r577436  
    4545                break; 
    4646        }        
    47         return $retval; 
     47        return $retval.' <span>'.get_option('mr_social_sharing_js_footer').'</span>'; 
    4848    } 
    4949} 
  • social-sharing-toolkit/trunk/includes/buttons/button.deviantart.php

    r575825 r577436  
    1010        $url = 'http://'.$id.'.deviantart.com/'; 
    1111        $text = ($text == '') ? __('My deviantArt','mr_social_sharing_toolkit') : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.facebook.php

    r575825 r577436  
    6969        $lang = __('en_US','mr_social_sharing_toolkit'); 
    7070        $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    71         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     71        $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__), $footer); 
    7272        $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
    73         return $retval; 
     73        return '<span style="display: inline-block; width: '.$width.'px; height: '.$height.'px; overflow: hidden;">'.$retval.'</span>'; 
    7474    } 
    7575                 
    7676    function fb_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') {    
    77         $lang = __('en_US','mr_social_sharing_toolkit'); 
    7877        switch ($type) { 
    7978            case 'vertical': 
    8079                $retval = '<fb:share-button type="box_count" href="'.$url.'"></fb:share-button>'; 
    8180                //$retval = '<a name="fb_share" type="box_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    82         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     81                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    8382                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    84                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     83                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    8584                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    8685                break; 
     
    8887                $retval = '<fb:share-button type="button_count" href="'.$url.'"></fb:share-button>'; 
    8988                //$retval = '<a name="fb_share" type="button_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    90         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     89                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    9190                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    92                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     91                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    9392                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    9493                break; 
     
    9695                $retval = '<fb:share-button type="button" href="'.$url.'"></fb:share-button>'; 
    9796                //$retval = '<a name="fb_share" type="button" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
    98         $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
     97                $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    9998                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    100                 $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
     99                $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
    101100                //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
    102101                break; 
     
    123122        $url = 'http://www.facebook.com/'.$id; 
    124123        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Facebook' : $text; 
    125         return $this->get_icon($type, $url, $text, $icon); 
     124        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     125        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    126126    } 
    127127} 
  • social-sharing-toolkit/trunk/includes/buttons/button.flickr.php

    r575825 r577436  
    1010        $url = 'http://www.flickr.com/photos/'.$id; 
    1111        $text = ($text == '') ? __('My photostream on','mr_social_sharing_toolkit').' Flickr' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.goodreads.php

    r575825 r577436  
    1010        $url = 'http://goodreads.com/profile/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Goodreads' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.googleplus.php

    r575825 r577436  
    99     
    1010    function gl_plus($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') { 
    11         $retval = '<g:plusone'; 
    1211        switch ($type) { 
    1312            case 'horizontal': 
     
    3837        $url = 'http://plus.google.com/'.$id; 
    3938        $text = ($text == '') ? __('Add me to your circles','mr_social_sharing_toolkit') : $text; 
    40         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4141    } 
    4242} 
  • social-sharing-toolkit/trunk/includes/buttons/button.hyves.php

    r575825 r577436  
    1616        $url = 'http://'.$id.'.hyves.nl'; 
    1717        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Hyves' : $text; 
    18         return $this->get_icon($type, $url, $text, $icon); 
     18        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     19        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1920    } 
    2021} 
  • social-sharing-toolkit/trunk/includes/buttons/button.lastfm.php

    r575825 r577436  
    1010        $url = 'http://www.last.fm/user/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Last.fm' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    }    
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.linkedin.php

    r575825 r577436  
    3939        $url = 'http://www.linkedin.com/in/'.$id; 
    4040        $text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    41         return $this->get_icon($type, $url, $text, $icon); 
     41        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     42        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4243    } 
    4344     
     
    4546        $url = 'http://www.linkedin.com/company/'.$id; 
    4647        $text = ($text == '') ? __('Follow my company on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    47         return $this->get_icon($type, $url, $text, $icon); 
     48        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     49        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4850    } 
    4951     
     
    5153        $url = 'http://www.linkedin.com/groups?gid='.$id; 
    5254        $text = ($text == '') ? __('Join my group on','mr_social_sharing_toolkit').' LinkedIn' : $text; 
    53         return $this->get_icon($type, $url, $text, $icon); 
     55        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     56        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    5457    } 
    5558} 
  • social-sharing-toolkit/trunk/includes/buttons/button.myspace.php

    r575825 r577436  
    1717        $url = 'http://www.myspace.com/'.$id; 
    1818        $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Myspace' : $text; 
    19         return $this->get_icon($type, $url, $text, $icon); 
     19        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     20        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    2021    } 
    2122} 
  • social-sharing-toolkit/trunk/includes/buttons/button.picasa.php

    r575825 r577436  
    1010        $url = 'http://picasaweb.google.com/'.$id; 
    1111        $text = ($text == '') ? __('My Picasa Web Albums','mr_social_sharing_toolkit') : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.pinterest.php

    r575825 r577436  
    3737        $url = 'http://pinterest.com/'.$id.'/'; 
    3838        $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Pinterest' : $text; 
    39         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4041    } 
    4142} 
  • social-sharing-toolkit/trunk/includes/buttons/button.rss.php

    r575825 r577436  
    1010        $url = $id; 
    1111        $text = ($text == '') ? 'RSS Feed' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.soundcloud.php

    r575825 r577436  
    1010        $url = 'http://soundcloud.com/'.$id; 
    1111        $text = ($text == '') ? __('My sounds on','mr_social_sharing_toolkit').' Soundcloud' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.spotify.php

    r575825 r577436  
    1010        $url = 'http://open.spotify.com/user/'.$id; 
    1111        $text = ($text == '') ? __('My profile on','mr_social_sharing_toolkit').' Spotify' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/buttons/button.tumblr.php

    r575825 r577436  
    1717        $url = 'http://'.$id.'.tumblr.com'; 
    1818        $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Tumblr' : $text; 
    19         return $this->get_icon($type, $url, $text, $icon); 
     19        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     20        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    2021    } 
    2122} 
  • social-sharing-toolkit/trunk/includes/buttons/button.twitter.php

    r575825 r577436  
    5353                $this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer); 
    5454                break; 
     55            case 'none': 
     56                $retval = '<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="'.$url.'"'; 
     57                if ($id != '') { 
     58                    $retval .= ' data-via="'.$id.'"'; 
     59                } 
     60                if ($count_url != '') { 
     61                    $retval .= ' data-counturl="'.$count_url.'"';    
     62                } 
     63                $retval .= ' data-text="'.$title.'">Tweet</a>'; 
     64                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
     65                $this->enqueue_script('Social_sharing_twitter', 'https://platform.twitter.com/widgets.js', $footer); 
     66                break; 
    5567            default: 
    5668                $url = 'https://twitter.com/share?url='.urlencode($url).'&amp;text='.urlencode($title); 
     
    8395                $url = 'https://twitter.com/'.$id; 
    8496                $text = ($text == '') ? __('Follow me on','mr_social_sharing_toolkit').' Twitter' : $text; 
    85                 $retval = $this->get_icon($type, $url, $text, $icon); 
     97                $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     98                $retval = $this->get_icon($type, $url, $text, $icon, false, $blank); 
    8699                break;   
    87100        } 
  • social-sharing-toolkit/trunk/includes/buttons/button.xing.php

    r575825 r577436  
    1313                $retval = '<script type="XING/Share" data-counter="right" data-lang="en" data-url="'.$url.'"></script>';                 
    1414                $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    15                 $this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', $footer); 
     15                $this->enqueue_script('Social_sharing_xing', 'https://www.xing-share.com/js/external/share.js', false); 
    1616                break; 
    1717            case 'vertical': 
     
    3737        $url = 'http://www.xing.com/profile/'.$id; 
    3838        $text = ($text == '') ? __('Join my network on','mr_social_sharing_toolkit').' Xing' : $text; 
    39         return $this->get_icon($type, $url, $text, $icon); 
     39        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     40        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    4041    } 
    4142} 
  • social-sharing-toolkit/trunk/includes/buttons/button.youtube.php

    r575825 r577436  
    1010        $url = 'http://www.youtube.com/user/'.$id; 
    1111        $text = ($text == '') ? __('Watch me on','mr_social_sharing_toolkit').' YouTube' : $text; 
    12         return $this->get_icon($type, $url, $text, $icon); 
     12        $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
     13        return $this->get_icon($type, $url, $text, $icon, false, $blank); 
    1314    } 
    1415} 
  • social-sharing-toolkit/trunk/includes/class.button.php

    r575825 r577436  
    55    protected $title; 
    66    protected $icon; 
     7    protected $scripts; 
    78     
    89    function MR_Social_Sharing_Toolkit_Button() { 
     
    1112        $this->title = ''; 
    1213        $this->icon = ''; 
     14        $this->scripts = array(); 
    1315    } 
    1416     
     
    8183     
    8284    function enqueue_script($name, $src, $footer = false) { 
    83         if ($footer) { 
    84             wp_enqueue_script($name, $src, array(), false, true); 
    85         } else { 
    86             wp_enqueue_script($name, $src); 
    87         } 
     85        $this->scripts[] = array('name' => $name, 'src' => $src, 'in_footer' => $footer); 
     86    } 
     87     
     88    function get_enqueued_scripts() { 
     89        return $this->scripts;   
    8890    } 
    8991} 
  • social-sharing-toolkit/trunk/readme.txt

    r575825 r577436  
    44Tags: Facebook, Like, LinkedIn, Share, Google, Plus, +1, Pinterest, Google+, Twitter, Tweet, Buffer, Follow, StumbleUpon, Stumble, Tumblr, Delicious, Digg, Reddit, Myspace, Hyves, YouTube, Flickr, 500px, Picasa, deaviantART, mail, RSS, feed, connect, recommend, social, sharing, widget, shortcode, page, post, button, counter, icon, bitly, Open Graph 
    55Requires at least: 3.0 
    6 Tested up to: 3.3.1 
    7 Stable tag: 2.0.9 
     6Tested up to: 3.4.1 
     7Stable tag: 2.1.0 
    88License: GPLv2 or later 
    99 
     
    8181* 500px 
    8282* Picasa 
     83* Instagram 
    8384* DeviantArt 
    8485* Last.fm 
     
    166167== Upgrade Notice == 
    167168 
     169= 2.1.0 = 
     170 
     171Please update to version 2.1.0 immediately for several crucial fixes. 
     172 
    168173= 2.0.9 = 
    169174 
     
    222227 
    223228== Changelog == 
     229 
     230= 2.1.0 = 
     231* Includes a fix for intrusive p-tag inclusion by some themes (thanks to Pia and Patrick for helping to debug this) 
     232* Replaced the Twitter icons 
     233* Included link to settings page in Plugins page of WP Admin 
     234* Added Instagram buttons (using Webstagram) 
     235* Added possibility to force follow links to open in new window / tab 
     236* Fixed slight overlap in WP admin when using IE8 
     237* Removed some redundant functions 
    224238 
    225239= 2.0.9 = 
  • social-sharing-toolkit/trunk/social_sharing_toolkit.php

    r575825 r577436  
    44Plugin URI: http://www.active-bits.nl/support/social-sharing-toolkit/ 
    55Description: This plugin enables sharing of your content via popular social networks and can also convert Twitter names and hashtags to links. Easy & configurable. 
    6 Version: 2.0.9 
     6Version: 2.1.0 
    77Author: Marijn Rongen 
    88Author URI: http://www.active-bits.nl 
     
    1717    var $follow_buttons; 
    1818    var $error; 
     19    var $scripts; 
    1920     
    2021    function MR_Social_Sharing_Toolkit() { 
    2122        $this->count = 0; 
    2223        $this->error = ''; 
     24        $this->scripts = array(); 
    2325        load_plugin_textdomain( 'mr_social_sharing_toolkit', false, dirname(plugin_basename(__FILE__)).'/languages/'); 
    2426        /* Declare button types */ 
     
    8991        $bitly_options = array('enable' => 0, 'username' => '', 'key' => '', 'cache' => array()); 
    9092        $opengraph_options = array('enable' => 0, 'default_image' => '', 'fixed_image' => 0); 
    91         $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options, 'mr_social_sharing_custom_css' => ''); 
     93        $this->options = array('mr_social_sharing_buttons' => $buttons, 'mr_social_sharing_shortcode_buttons' => $shortcodes, 'mr_social_sharing_widget_buttons' => $widgets, 'mr_social_sharing_follow_buttons' => $followers, 'mr_social_sharing_display' => 'span', 'mr_social_sharing_shortcode_display' => 'span', 'mr_social_sharing_widget_display' => 'span', 'mr_social_sharing_follow_display' => 'span', 'mr_social_sharing_align' => '', 'mr_social_sharing_shortcode_align' => '', 'mr_social_sharing_widget_align' => '', 'mr_social_sharing_follow_align' => '', 'mr_social_sharing_position' => 'none', 'mr_social_sharing_types' => array('post', 'page'), 'mr_social_sharing_enable_shortcode' => 1, 'mr_social_sharing_include_excerpts' => 1, 'mr_social_sharing_button_order' => $button_order, 'mr_social_sharing_shortcode_button_order' => $shortcode_order, 'mr_social_sharing_widget_button_order' => $widget_order, 'mr_social_sharing_follow_button_order' => $follow_order, 'mr_social_sharing_linkify_content' => 0, 'mr_social_sharing_linkify_comments' => 0, 'mr_social_sharing_linkify_new' => 1, 'mr_social_sharing_follow_new' => 1, 'mr_social_sharing_twitter_handles' => 0, 'mr_social_sharing_twitter_hashtags' => 0, 'mr_social_sharing_js_footer' => 1, 'mr_social_sharing_no_follow' => 0, 'mr_social_sharing_pinterest' => $pinterest_options, 'mr_social_sharing_bitly' => $bitly_options, 'mr_social_sharing_opengraph' => $opengraph_options, 'mr_social_sharing_custom_css' => ''); 
    9294        foreach ($this->options as $key => $val) { 
    9395            $this->options[$key] = get_option( $key, $val ); 
     
    172174        add_options_page('Social Sharing', 'Social Sharing Toolkit', 'manage_options', 'mr_social_sharing', array($this, 'plugin_admin_page')); 
    173175        add_filter('plugin_row_meta', array('MR_Social_Sharing_Toolkit', 'plugin_links'),10,2); 
    174         wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin.css', __FILE__)); 
    175         wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin.js', __FILE__)); 
    176176        wp_enqueue_script('jquery-ui-tabs'); 
    177177        wp_enqueue_script('jquery-ui-sortable'); 
     178        wp_enqueue_style('mr_social_sharing-admin', plugins_url('/admin_2.1.0.css', __FILE__)); 
     179        wp_enqueue_script('mr_social_sharing-admin', plugins_url('/admin_2.1.0.js', __FILE__)); 
    178180    } 
    179181     
     
    181183        if ($file == plugin_basename(__FILE__)) { 
    182184            $links[] = '<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=P8ZVNC57E58FE&lc=NL&item_name=WordPress%20plugins%20by%20Marijn%20Rongen&item_number=Social%20Sharing%20Toolkit&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">'.__('Donate','mr_social_sharing_toolkit').'</a>'; 
     185            $links[] = '<a href="/wp-admin/options-general.php?page=mr_social_sharing">'.__('Settings').'</a>'; 
    183186        } 
    184187        return $links; 
     
    256259                            echo ' 
    257260                            <br/> 
    258                             <label for="mr_social_sharing_enable_shortcode" class="check"><input type="checkbox" name="mr_social_sharing_enable_shortcode" id="mr_social_sharing_enable_shortcode"'; 
    259         if ($this->options['mr_social_sharing_enable_shortcode'] == 1) {    echo ' checked="checked"';}  
    260         echo ' value="1" /> '.__('Enable shortcode').'</label><br/> 
     261                            <input type="hidden" name="mr_social_sharing_enable_shortcode" value="1" /> 
    261262                            <p><span class="description"> '.__('Use the shortcode [social_share/] where you want the buttons to appear', 'mr_social_sharing_toolkit').'</span></p> 
    262263                            <label for="mr_social_sharing_include_excerpts" class="check"><input type="checkbox" name="mr_social_sharing_include_excerpts" id="mr_social_sharing_include_excerpts"'; 
     
    306307        $this->showListAdmin($this->follow_buttons, 'follow_'); 
    307308        echo ' 
     309                        <label for="mr_social_sharing_follow_new" class="check"><input type="checkbox" name="mr_social_sharing_follow_new" id="mr_social_sharing_follow_new"'; 
     310        if ($this->options['mr_social_sharing_follow_new'] == 1) { echo ' checked="checked"';} 
     311        echo ' value="1" /> '.__("Open links in new window or tab", 'mr_social_sharing_toolkit').'</label>       
    308312                    </div> 
    309313                    <div id="tab_5" class="mr_social_sharing_networks"> 
    310                         <h3>'.__('Advanced settings','mr_social_sharing_toolkit').'</h3> 
     314                        <h3>'.__('Advanced settings','mr_social_sharing_toolkit').'</h3>                                         
    311315                        <h4>'.__('Automatic Twitter links','mr_social_sharing_toolkit').'</h4> 
    312316                        <p>'.__('Select what you want to convert:','mr_social_sharing_toolkit').'</p> 
     
    472476        $banners = array(); 
    473477        // ElegantThemes: 
    474         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    475         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    476         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    477         $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757_0_1_7" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     478        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     479        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     480        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
     481        $banners[] = '<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=14757" target="_blank"><img border="0" src="http://www.elegantthemes.com/affiliates/banners/468x60.gif" width="468" height="60"></a>'; 
    478482        // WooThemes: 
    479         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l104" target="_blank"><img src="http://www.woothemes.com/ads/wc_468x60_grey.png" /></a>'; 
    480         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l102" target="_blank"><img src="http://www.woothemes.com/ads/wc_468x60_3_grey.png" /></a>'; 
    481         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l44" target="_blank"><img src="http://woothemes.com/ads/468x60c.jpg" /></a>'; 
    482         $banners[] = '<a href="http://www.woothemes.com/woomember/go?r=188860&i=l43" target="_blank"><img src="http://woothemes.com/ads/468x60b.jpg" /></a>'; 
     483        $banners[] = '<a href="http://woothemes.zferral.com/l/53/33738" title=""><img src="http://woothemes.zferral.com/m/53" alt="" title="" style="border: none"   /></a>';             
     484        $banners[] = '<a href="http://woothemes.zferral.com/l/32/33738" title=""><img src="http://woothemes.zferral.com/m/32" alt="" title="" style="border: none"   /></a>';                        
    483485        // Mojo Themes: 
    484486        $banners[] = '<a href="http://www.mojo-themes.com/categories/wordpress/?r=mrongen" target="_blank"><img src="'.plugins_url('/banners/mojo_1.jpg', __FILE__).'" /></a>'; 
     
    503505     
    504506    function print_opengraph() { 
    505         echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.0.9 --> 
     507        echo '<!-- Open Graph tags provided by Social Sharing Toolkit v2.1.0 --> 
    506508        <meta property="og:locale" content="'.str_replace('-', '_', get_bloginfo('language')).'"/>'; 
    507509        if (is_single() || is_page()) { 
     
    531533            if ($this->options['mr_social_sharing_opengraph']['default_image'] != '') { 
    532534                echo '           
    533             <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
     535        <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
    534536            } 
    535537        } else { 
     
    553555            if ($media != '') { 
    554556                echo '           
    555             <meta property="og:image" content="'.$media.'"/>'; 
     557        <meta property="og:image" content="'.$media.'"/>'; 
    556558            } elseif ($this->options['mr_social_sharing_opengraph']['default_image'] != '') { 
    557559                echo '           
    558             <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
     560        <meta property="og:image" content="'.$this->options['mr_social_sharing_opengraph']['default_image'].'"/>'; 
    559561            } 
    560562        } 
     
    562564     
    563565    function prepare_styles() { 
    564         wp_enqueue_style('mr_social_sharing', plugins_url('/style.css', __FILE__)); 
     566        wp_enqueue_style('mr_social_sharing', plugins_url('/style_2.1.0.css', __FILE__)); 
    565567        $upload = wp_upload_dir(); 
    566568        if (file_exists($upload['basedir'].'/social_sharing_custom.css') && $this->options['mr_social_sharing_custom_css'] != '') { 
     
    569571    } 
    570572     
    571     function prepare_scripts() {         
     573    function prepare_scripts() { 
    572574        if ($this->options['mr_social_sharing_no_follow'] == 1) { 
    573575            if ($this->options['mr_social_sharing_js_footer'] == 1) { 
    574                 wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery'), false, true); 
     576                wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow_2.1.0.js', __FILE__), array('jquery'), false, true); 
    575577            } else { 
    576                 wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow.js', __FILE__), array('jquery')); 
     578                wp_enqueue_script('mr_social_sharing', plugins_url('/script_no_follow_2.1.0.js', __FILE__), array('jquery')); 
    577579            } 
    578580        } else { 
    579581            if ($this->options['mr_social_sharing_js_footer'] == 1) { 
    580                 wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery'), false, true); 
     582                wp_enqueue_script('mr_social_sharing', plugins_url('/script_2.1.0.js', __FILE__), array('jquery'), false, true); 
    581583            } else { 
    582                 wp_enqueue_script('mr_social_sharing', plugins_url('/script.js', __FILE__), array('jquery')); 
    583             } 
    584         } 
    585     } 
     584                wp_enqueue_script('mr_social_sharing', plugins_url('/script_2.1.0.js', __FILE__), array('jquery')); 
     585            } 
     586        } 
     587        $this->load_scripts(); 
     588        if (is_array($this->scripts) && count($this->scripts) > 0) { 
     589            foreach ($this->scripts as $script) { 
     590                wp_enqueue_script($script['name'], $script['src'], array(), false, $script['in_footer']); 
     591            }    
     592        } 
     593    }    
     594     
     595    function load_scripts() { 
     596        $types = array('', 'shortcode_', 'widget_'); 
     597        foreach ($types as $type) { 
     598            foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) { 
     599                if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) { 
     600                    $id = (array_key_exists('id', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['id'] : ''; 
     601                    $text = (array_key_exists('text', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_'.$type.'buttons'][$button]['text']) : ''; 
     602                    $icon = (array_key_exists('icon', $this->options['mr_social_sharing_'.$type.'buttons'][$button])) ? $this->options['mr_social_sharing_'.$type.'buttons'][$button]['icon'] : ''; 
     603                    foreach ($this->buttons as $tmp) { 
     604                        if (method_exists($tmp, $button)) {          
     605                            $tmp->$button('','', $this->options['mr_social_sharing_'.$type.'buttons'][$button]['type'], $id, '', '', $text, $icon); 
     606                            if (is_array($tmp->get_enqueued_scripts())) { 
     607                                $this->scripts = array_merge($this->scripts, $tmp->get_enqueued_scripts());  
     608                            } 
     609                        } 
     610                    } 
     611                } 
     612            } 
     613        }    
     614        foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) { 
     615            if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) { 
     616                $id = (array_key_exists('id', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['id'] : ''; 
     617                $text = (array_key_exists('text', $this->options['mr_social_sharing_follow_buttons'][$button])) ? stripslashes($this->options['mr_social_sharing_follow_buttons'][$button]['text']) : ''; 
     618                $icon = (array_key_exists('icon', $this->options['mr_social_sharing_follow_buttons'][$button])) ? $this->options['mr_social_sharing_follow_buttons'][$button]['icon'] : ''; 
     619                foreach ($this->buttons as $tmp) { 
     620                    if (method_exists($tmp, $button)) {          
     621                        $tmp->$button($this->options['mr_social_sharing_follow_buttons'][$button]['type'], $id, $text, $icon); 
     622                        if (is_array($tmp->get_enqueued_scripts())) { 
     623                            $this->scripts = array_merge($this->scripts, $tmp->get_enqueued_scripts());  
     624                        } 
     625                    } 
     626                }                
     627            } 
     628        } 
     629    }    
    586630     
    587631    function create_bookmarks($url = '', $title = '', $type = '', $media = '', $description = '') { 
     
    594638        $bookmarks = ' 
    595639                <div class="mr_social_sharing_wrapper"> 
    596                 <!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
     640                <!-- Social Sharing Toolkit v2.1.0 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
    597641        foreach ($this->options['mr_social_sharing_'.$type.'button_order'] as $button) { 
    598642            if ($this->options['mr_social_sharing_'.$type.'buttons'][$button]['enable'] == 1) { 
     
    606650        $bookmarks = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $bookmarks); 
    607651        $this->count++; 
     652        echo 'bookmarks'; 
    608653        return $bookmarks;   
    609654    } 
     
    612657        $followers = ' 
    613658                <div class="mr_social_sharing_wrapper"> 
    614                 <!-- Social Sharing Toolkit v2.0.9 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
     659                <!-- Social Sharing Toolkit v2.1.0 | http://www.active-bits.nl/support/social-sharing-toolkit/ -->'; 
    615660        foreach ($this->options['mr_social_sharing_follow_button_order'] as $button) { 
    616661            if ($this->options['mr_social_sharing_follow_buttons'][$button]['enable'] == 1) { 
     
    623668        $followers .= '</div>'; 
    624669        $followers = str_replace('<div class="mr_social_sharing_wrapper"></div>', '', $followers); 
     670        echo 'follow'; 
    625671        return $followers; 
    626672    } 
     
    648694                if (method_exists($tmp, $button)) {          
    649695                    $retval = '<'.$display.' class="mr_social_sharing'.$align.'">'.$tmp->$button($type, $id, $text, $icon).'</'.$display.'>'; 
    650                 } 
     696                }                
    651697            } 
    652698        } 
     
    768814    } 
    769815     
    770     function should_use_shortcode() { 
    771         if ($this->options['mr_social_sharing_enable_shortcode'] == 1) { 
    772             return true; 
    773         } 
    774         return false;    
    775     } 
    776      
    777816    function share_shortcode() { 
    778817        if (is_feed()) { 
     
    805844            $type = get_post_type(); 
    806845            $bookmarks = '';         
    807             if ($this->options['mr_social_sharing_enable_shortcode'] == 1 && ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1)) { 
     846            if ((is_single() || $type == 'page') || $this->options['mr_social_sharing_include_excerpts'] == 1) { 
    808847                $bookmarks = $this->create_bookmarks(get_permalink(), the_title('','',false), 'shortcode_', $media, ''); 
    809848            } 
     
    857896$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit(); 
    858897add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu')); 
    859 add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles')); 
    860 add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts')); 
    861898if ($MR_Social_Sharing_Toolkit->should_print_opengraph()) {  
    862899    add_action('wp_head', array($MR_Social_Sharing_Toolkit, 'print_opengraph'), 1); 
     
    874911    add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'share')); 
    875912} 
    876 if ($MR_Social_Sharing_Toolkit->should_use_shortcode()) { 
    877     add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode')); 
    878 } 
     913add_shortcode('social_share', array($MR_Social_Sharing_Toolkit, 'share_shortcode'), 15); 
     914add_action('wp_print_styles', array($MR_Social_Sharing_Toolkit, 'prepare_styles'), 50); 
     915add_action('wp_print_scripts', array($MR_Social_Sharing_Toolkit, 'prepare_scripts'), 50); 
    879916include 'includes/share.widget.php'; 
    880917include 'includes/follow.widget.php'; 
Note: See TracChangeset for help on using the changeset viewer.