Plugin Directory

Changeset 612276


Ignore:
Timestamp:
10/14/2012 02:08:06 PM (13 years ago)
Author:
TM3909
Message:

Updating to github v1.4. Cleaning up files.

Location:
wpsocialite/trunk
Files:
1 added
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • wpsocialite/trunk

    • Property svn:ignore set to
      .svnignore
      .git
      .gitignore
      .gitmodules
      .DS_Store
      README.md
  • wpsocialite/trunk/lib/wpsocialite.css

    r600605 r612276  
    1 .cf:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
    2 * html .cf { zoom: 1; }
    3 *:first-child+html .cf { zoom: 1; }
     1.wpsocialite:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
    42
    53/* visually hidden from HTML5 Boilerplate */
    6 .vhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
     4.wpsocialite .vhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
     5
    76
    87/*
     
    2019 */
    2120
    22 .large { display: block; list-style: none; padding: 0; margin: 20px; }
    23 .large > li { display: block; margin: 0; padding: 10px; float: left; }
    24 .large .socialite { display: block; position: relative; background: url('social-sprite.png') 0 0 no-repeat; }
    25 .large .socialite-loaded { background: none !important; }
    26 .large .twitter-share { width: 55px; height: 65px; background-position: 0 0; }
    27 .large .googleplus-one { width: 50px; height: 65px; background-position: -75px 0; }
    28 .large .facebook-like { width: 50px; height: 65px; background-position: -145px 0; }
    29 .large .linkedin-share { width: 60px; height: 65px; background-position: -215px 0; }
    30 .large .pinterest-pinit { width: 50px; height: 65px; background-position: -367px 0; }
     21
     22.wpsocialite.large { display: block; list-style: none; padding: 0; margin: 20px; }
     23.wpsocialite.large > li { display: block; margin: 0; padding: 10px; float: left; }
     24.wpsocialite.large .socialite { display: block; position: relative; background: url('social-sprite.png') 0 0 no-repeat; }
     25.wpsocialite.large .socialite-loaded { background: none !important; }
     26.wpsocialite.large .twitter-share { width: 55px; height: 65px; background-position: 0 0; }
     27.wpsocialite.large .googleplus-one { width: 50px; height: 65px; background-position: -75px 0; }
     28.wpsocialite.large .facebook-like { width: 50px; height: 65px; background-position: -145px 0; }
     29.wpsocialite.large .linkedin-share { width: 60px; height: 65px; background-position: -215px 0; }
     30.wpsocialite.large .pinterest-pinit { width: 50px; height: 65px; background-position: -367px 0; }
    3131
    3232/*
     
    3434 */
    3535
    36 .small-load { margin: 0 0 0.625em 0; font-weight: bold; padding: 5px; }
    3736
    38 .small { display: block; list-style: none; padding: 10px; margin: 10px; }
    39 .small > li { margin: 0; display:inline; float:left; width:20%; }
    40 .small .socialite { display: block; position: relative; width: 150px; height: 30px; background: url('custom-default.png') 0 0 no-repeat; }
    41 .small .socialite-loaded { background: none; }
     37/* .small-load { margin: 0 0 0.625em 0; font-weight: bold; padding: 5px; } */
    4238
    43 .small .twitter-share { background-position: 0 0; }
    44 .small .googleplus-one { background-position: 0 -45px; }
    45 .small .facebook-like { background-position: 0 -90px; }
    46 .small .linkedin-share { background-position: 0 -135px; }
    47 .small .pinterest-pinit { background-position: 0 -175px; }
     39.wpsocialite.small { display: block; list-style: none; padding: 10px; margin: 10px; }
     40.wpsocialite.small > li { margin: 0; display:inline; float:left; width:20%; }
     41.wpsocialite.small .socialite { display: block; position: relative; width: 150px; height: 30px; background: url('custom-default.png') 0 0 no-repeat; }
     42.wpsocialite.small .socialite-loaded { background: none; }
     43
     44.wpsocialite.small .twitter-share { background-position: 0 0; }
     45.wpsocialite.small .googleplus-one { background-position: 0 -45px; }
     46.wpsocialite.small .facebook-like { background-position: 0 -90px; }
     47.wpsocialite.small .linkedin-share { background-position: 0 -135px; }
     48.wpsocialite.small .pinterest-pinit { background-position: 0 -175px; }
  • wpsocialite/trunk/readme.txt

    r611956 r612276  
    55Requires at least: 3.0
    66Tested up to: 3.4.2
    7 Stable tag: 1.4
     7Stable tag: 1.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050== Changelog ==
    5151
    52 = 1.4 =
    53 * Changed how external scripts are loading, consolidated js files, added pinterest image support.
    54 
    5552= 1.3 =
    5653* Major Bugfix, CSS ID calls causing feed issues. Changed to classes.
     54
    5755
    5856= 1.2 =
     
    6967== Upgrade Notice ==
    7068
    71 = 1.4 =
    72 Made JS Files more efficient, changed CSS to reduce conflicts and added Pinterest image support.
    73 
    7469= 1.0 =
    7570None as of yet.
     71
     72
  • wpsocialite/trunk/wpsocialite.php

    r611956 r612276  
    22/*
    33Plugin Name: WPSocialite
    4 Plugin URI: http://wordpress.org/extend/plugins/wpsocialte/
     4Plugin URI: http://wordpress.org/extend/plugins/wpsocialite/
    55Description: No one likes long load times! Yet we all want to be able to share our content via Facebook, Twitter, and all other social networks. These take a long time to load. Paradox? Not anymore! With WPSocialite (utilizing David Bushnell's amazing SocialiteJS plugin [http://www.socialitejs.com/]) we can manage the loading process of our social sharing links. Load them on hover, on page scroll, and more!
    66Author: Tom Morton
    7 Version: 1.4
     7Version: 1.3
    88Author URI: http://twmorton.com/
    99
     
    5050            add_action( 'wp_head', array( &$this, 'wpsocialite_vardefine_head' ) );
    5151
     52            add_filter( 'body_class', array( &$this, 'wpsocialite_body_class' ) );
     53
    5254            add_filter( 'the_content', array( &$this, 'wpsocialite_add_to_content' ) );
     55
     56            if( get_option('wpsocialite_excerpt') == 1 ){
     57                add_filter( 'the_excerpt', array( &$this, 'wpsocialite_add_to_content' ) );
     58            }
    5359
    5460        } // __construct
     
    7884            echo $script;
    7985        }
     86        function wpsocialite_body_class($classes)
     87        {
     88            $value = get_option('wpsocialite_mode');
     89
     90            if(!is_admin() && $value == 'scroll' ){
     91
     92                $classes[] = 'wpsocialite-scroll';
     93
     94            }
     95
     96            return $classes;
     97
     98        }
    8099        function wpsocialite_enqueue_scripts()
    81100        {
     
    83102
    84103                wp_enqueue_script('socialite-lib', WPSOCIALITE_URL_SOCIALITE.'/socialite.min.js', array('jquery'), '1.0', true);
    85                 wp_enqueue_script('socialite-pinterest', WPSOCIALITE_URL_SOCIALITE.'/extensions/socialite.pinterest.js', array('jquery'), '1.0', true);
    86 
    87                 $value = get_option('wpsocialite_mode');
    88                 if($value == 'scroll'){
    89                     wp_enqueue_script('wpsocialite-scroll', WPSOCIALITE_URL.'/wpsocialite-scroll.js', array('jquery'), '1.0', true);
    90                 }else{
    91                     wp_enqueue_script('wpsocialite-scroll', WPSOCIALITE_URL.'/wpsocialite-hover.js', array('jquery'), '1.0', true);
     104
     105                wp_enqueue_script('wpsocialite', WPSOCIALITE_URL.'wpsocialite.js', array('jquery'), '1.0', true);
     106
     107                $scripts = WPSocialite_Options::wpsocialite_list_network_options(null, null, null, null);
     108
     109                $value = get_option('wpsocialite_networkoptions');
     110
     111                foreach ($scripts as $script){
     112                    if( isset($value[$script['slug']]) && $script['external_file'] !== false )
     113                        wp_enqueue_script('socialite-'.$script['slug'].'', WPSOCIALITE_URL_SOCIALITE.'/extensions/'.$script['external_file'].'', array('jquery'), '1.0', true);
    92114                }
    93115
    94116            }// if is admin
    95117
    96         } // wpsocialite_enqueue_scripts
     118        } // wpsocialite_enqueue_scripts()
    97119
    98120        function wpsocialite_enqueue_styles()
     
    115137            $id = $post->ID; //get post id
    116138            $postlink = get_permalink($id); //get post link
     139            $imagelink = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'full' ); //get the featured image url
    117140            $title = trim($post->post_title); // get post title
    118141
    119142            $value = get_option('wpsocialite_networkoptions');
    120             $buttons = WPSocialite_Options::wpsocialite_list_network_options($postlink, $title, $size);
     143            $buttons = WPSocialite_Options::wpsocialite_list_network_options($postlink, $title, $size, $imagelink[0]);
    121144
    122145            $return = '';
    123 
    124             $return .= '<ul class="'.$size.'" class="social-buttons cf">';
     146            $return .= '<ul class="wpsocialite social-buttons '.$size.'">';
    125147
    126148            foreach ($buttons as $button){
     
    201223
    202224            add_settings_field(
     225                $id = 'wpsocialite_excerpt',
     226                $title = "WPSocialite Excerpt",
     227                $callback = array( &$this, 'wpsocialite_excerpt' ),
     228                $page = 'discussion'
     229                );
     230            register_setting( $option_group = 'discussion', $option_name = 'wpsocialite_excerpt' );
     231
     232            add_settings_field(
    203233                $id = 'wpsocialite_classes',
    204234                $title = "WPSocialite Classes",
     
    267297                </label>';
    268298
    269 
     299        } // function
     300
     301        function wpsocialite_excerpt()
     302        {
     303            $value = get_option('wpsocialite_excerpt');
     304            # echo your form fields here containing the value received from get_option
     305            if($value == 1) :
     306                $checked = 'checked';
     307            else :
     308                $checked = '';
     309            endif;
     310
     311            echo '<label for="wpsocialite_excerpt">
     312                    <input name="wpsocialite_excerpt" type="checkbox" id="wpsocialite_excerpt" value="1" '.$checked.'>
     313                    Display WPSocialite sharing options in the excerpt of your posts.
     314                </label>';
    270315
    271316        } // function
     
    375420        }
    376421
    377         function wpsocialite_list_network_options($link = null, $title = null, $size = null) {
    378             $buttons = array(
    379                 'facebook' => array(
    380                     'name' => 'Facebook',
    381                     'slug' => 'facebook',
    382                     'markup_large' => '<a href="http://www.facebook.com/sharer.php?u='.$link.'&amp;t='.$title.'" class="socialite facebook-like" data-href="'.$link.'" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span class="vhidden">Share on Facebook</span></a>',
    383                     'markup_small' => '<a href="http://www.facebook.com/sharer.php?u='.$link.'&amp;t='.$title.'" class="socialite facebook-like" data-href="'.$link.'" data-send="false" data-layout="button_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span class="vhidden">Share on Facebook</span></a>'
    384                 ),
    385                 'twitter' => array(
    386                     'name' => 'Twitter',
    387                     'slug' => 'twitter',
    388                     'markup_large' => '<a href="http://twitter.com/share" class="socialite twitter-share" data-text="'.$title.'" data-url="'.$link.'" data-count="vertical" rel="nofollow" target="_blank"><span class="vhidden">Share on Twitter</span></a>',
    389                     'markup_small' => '<a href="http://twitter.com/share" class="socialite twitter-share" data-text="'.$title.'" data-url="'.$link.'" data-count="horizontal" data-via="dbushell" rel="nofollow" target="_blank"><span class="vhidden">Share on Twitter</span></a>'
    390                 ),
    391                 'gplus' => array(
    392                     'name' => 'Google Plus',
    393                     'slug' => 'gplus',
    394                     'markup_large' => '<a href="https://plus.google.com/share?url='.$link.'" class="socialite googleplus-one" data-size="tall" data-href="'.$link.'" rel="nofollow" target="_blank"><span class="vhidden">Share on Google+</span></a>',
    395                     'markup_small' => '<a href="https://plus.google.com/share?url='.$link.'" class="socialite googleplus-one" data-size="medium" data-href="'.$link.'" rel="nofollow" target="_blank"><span class="vhidden">Share on Google+</span></a>'
    396                 ),
    397                 'linkedin' => array(
    398                     'name' => 'Linkedin',
    399                     'slug' => 'linkedin',
    400                     'markup_large' => '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url='.$link.'&amp;title='.$title.'" class="socialite linkedin-share" data-url="'.$link.'" data-counter="top" rel="nofollow" target="_blank"><span class="vhidden">Share on LinkedIn</span></a>',
    401                     'markup_small' => '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url='.$link.'&amp;title=Socialite.js" class="socialite linkedin-share" data-url="'.$link.'" data-counter="right" rel="nofollow" target="_blank"><span class="vhidden">Share on LinkedIn</span></a>'
    402                 ),
    403                 'pintrest' => array(
    404                     'name' => 'Pintrest',
    405                     'slug' => 'pintrest',
    406                     'markup_large' => '<a href="http://pinterest.com/pin/create/button/?url='.$link.'&amp;media=&amp;description='.$title.'" class="socialite pinterest-pinit" data-count-layout="vertical"><span class="vhidden">Pin It!</span></a>',
    407                     'markup_small' => '<a href="http://pinterest.com/pin/create/button/?url='.$link.'&amp;description='.$title.'" class="socialite pinterest-pinit" data-count-layout="horizontal"><span class="vhidden">Pin It!</span></a>'
    408                 ),
    409             );
     422        function wpsocialite_list_network_options($link = null, $title = null, $size = null, $image = null) {
     423            if( $image == '') { $image = null; } //link post featured image with Pinterest, if available
     424
     425            $buttons = array(
     426                'facebook' => array(
     427                    'name' => 'Facebook',
     428                    'slug' => 'facebook',
     429                    'markup_large' => '<a href="http://www.facebook.com/sharer.php?u='.$link.'&amp;t='.$title.'" class="socialite facebook-like" data-href="'.$link.'" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span class="vhidden">Share on Facebook</span></a>',
     430                    'markup_small' => '<a href="http://www.facebook.com/sharer.php?u='.$link.'&amp;t='.$title.'" class="socialite facebook-like" data-href="'.$link.'" data-send="false" data-layout="button_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span class="vhidden">Share on Facebook</span></a>',
     431                    'external_file' => false
     432                ),
     433                'twitter' => array(
     434                    'name' => 'Twitter',
     435                    'slug' => 'twitter',
     436                    'markup_large' => '<a href="http://twitter.com/share" class="socialite twitter-share" data-text="'.$title.'" data-url="'.$link.'" data-count="vertical" rel="nofollow" target="_blank"><span class="vhidden">Share on Twitter</span></a>',
     437                    'markup_small' => '<a href="http://twitter.com/share" class="socialite twitter-share" data-text="'.$title.'" data-url="'.$link.'" data-count="horizontal" data-via="" rel="nofollow" target="_blank"><span class="vhidden">Share on Twitter</span></a>',
     438                    'external_file' => false
     439                ),
     440                'gplus' => array(
     441                    'name' => 'Google Plus',
     442                    'slug' => 'gplus',
     443                    'markup_large' => '<a href="https://plus.google.com/share?url='.$link.'" class="socialite googleplus-one" data-size="tall" data-href="'.$link.'" rel="nofollow" target="_blank"><span class="vhidden">Share on Google+</span></a>',
     444                    'markup_small' => '<a href="https://plus.google.com/share?url='.$link.'" class="socialite googleplus-one" data-size="medium" data-href="'.$link.'" rel="nofollow" target="_blank"><span class="vhidden">Share on Google+</span></a>',
     445                    'external_file' => false
     446                ),
     447                'linkedin' => array(
     448                    'name' => 'Linkedin',
     449                    'slug' => 'linkedin',
     450                    'markup_large' => '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url='.$link.'&amp;title='.$title.'" class="socialite linkedin-share" data-url="'.$link.'" data-counter="top" rel="nofollow" target="_blank"><span class="vhidden">Share on LinkedIn</span></a>',
     451                    'markup_small' => '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url='.$link.'&amp;title=Socialite.js" class="socialite linkedin-share" data-url="'.$link.'" data-counter="right" rel="nofollow" target="_blank"><span class="vhidden">Share on LinkedIn</span></a>',
     452                    'external_file' => false
     453                ),
     454                'pintrest' => array(
     455                    'name' => 'Pintrest',
     456                    'slug' => 'pintrest',
     457                    'markup_large' => '<a href="http://pinterest.com/pin/create/button/?url='.$link.'&amp;media=' . $image . '&amp;description='.$title.'" class="socialite pinterest-pinit" data-count-layout="vertical"><span class="vhidden">Pin It!</span></a>',
     458                    'markup_small' => '<a href="http://pinterest.com/pin/create/button/?url='.$link.'&amp;media=' . $image . '&amp;description='.$title.'" class="socialite pinterest-pinit" data-count-layout="horizontal"><span class="vhidden">Pin It!</span></a>',
     459                    'external_file' => 'socialite.pinterest.js'
     460                ),
     461            );
    410462
    411463            return $buttons;
Note: See TracChangeset for help on using the changeset viewer.