Plugin Directory

Changeset 615367


Ignore:
Timestamp:
10/21/2012 08:21:20 PM (13 years ago)
Author:
TM3909
Message:

Updated to 1.4.2. Fixed pinterest loading issue, feed issue and removed class selection option.

Location:
wpsocialite/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wpsocialite/trunk/readme.txt

    r612879 r615367  
    55Requires at least: 3.0
    66Tested up to: 3.4.2
    7 Stable tag: 1.4.1
     7Stable tag: 1.4.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737Of course! Use the "manual" setting under the plugin settings (Settings->Discussion) and then use the following PHP in your template to display the links however you please.
    3838
    39 `<?php echo $wpsocialite->wpsocialite_markup('large'); ?>`
     39`<?php echo wpsocialite::wpsocialite_markup('large'); ?>`
    4040
    4141When using this method, be sure to include "large" or "small" inside the function (as seen above) to define which style WPSocialite will use to display your social links.
     
    5959
    6060== Changelog ==
     61
     62= 1.4.2 =
     63* Fixed Pinterest loading all at once. Corrected readme instructions for manual usage. Removed class selection option.
    6164
    6265= 1.4.1 =
     
    8285== Upgrade Notice ==
    8386
     87= 1.4.2 =
     88Fixed Pinterest loading all at once. Removed class selection option.
     89
    8490= 1.4.1 =
    8591Cleaned up files and added ability to disable automatic loading of JS and CSS. Upgrade to ensure no compatability issues arise.
  • wpsocialite/trunk/wpsocialite.js

    r612276 r615367  
    11jQuery(function($) {
    22
     3    Socialite.process(); //processing each instance before we take any action. Makes sure pinterest loads individually and not all together.
     4
    35    if ( $("body").hasClass("wpsocialite-scroll") ) { //If set to 'scroll'
    4    
    5         var articles = $(thePostClasses), socialised = { }, win = $(window), updateArticles, onUpdate, updateTimeout;
     6        var articles = $('.social-buttons'), socialised = { }, win = $(window), updateArticles, onUpdate, updateTimeout;
    67
    78        updateArticles = function()
     
    4546
    4647        setTimeout(updateArticles, 100);
    47        
     48
    4849    } else { //If not set to 'scroll', default to hover
    49    
    50         $(thePostClasses).one('mouseenter', function(){
     50
     51        $('.social-buttons').parent().one('mouseenter', function(){
    5152            Socialite.load($(this)[0]);
    52         });     
    53        
     53        });
     54
    5455    }
    5556
  • wpsocialite/trunk/wpsocialite.php

    r612879 r615367  
    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.1
     7Version: 1.4.2
    88Author URI: http://twmorton.com/
    99
     
    5151            add_action( 'init', array( &$this, 'init' ) );
    5252
    53             add_action( 'wp_head', array( &$this, 'wpsocialite_vardefine_head' ) );
    54 
    5553            add_filter( 'body_class', array( &$this, 'wpsocialite_body_class' ) );
    5654
     
    7573            }
    7674        } // init
    77         function wpsocialite_vardefine_head()
    78         {
    79             global $wp;
    80 
    81             $value = get_option('wpsocialite_classes');
    82 
    83             if($value == ''){
    84                 $value = 'article.post, .post, .page, .social-buttons';
    85             }
    86 
    87             $script = "<script type=\"text/javascript\"> var thePostClasses = '$value'; </script>\n";
    88 
    89             echo $script;
    90         }
     75
    9176        function wpsocialite_body_class($classes)
    9277        {
     
    175160            $size = get_option('wpsocialite_style');
    176161
     162            if(is_feed())
     163                return $content; //do not include social markup in feed
     164
    177165            switch($position){
    178166
    179167                case 'manual':
    180                     //nada
     168                    //nothing
    181169                break;
    182170
     
    234222                );
    235223            register_setting( $option_group = 'discussion', $option_name = 'wpsocialite_excerpt' );
    236 
    237             add_settings_field(
    238                 $id = 'wpsocialite_classes',
    239                 $title = "WPSocialite Classes",
    240                 $callback = array( &$this, 'wpsocialite_classes' ),
    241                 $page = 'discussion'
    242                 );
    243             register_setting( $option_group = 'discussion', $option_name = 'wpsocialite_classes' );
    244224
    245225            add_settings_field(
     
    348328                        '.$options.'
    349329                    </select>
    350                     Choose where you would like the social icons to appear, before or after the main content.
     330                    Choose where you would like the social icons to appear, before or after the main content. If set to <strong>Manual</strong>, you can use this code to place your Social links anywhere you like: <pre>&lt;?php echo wpsocialite::wpsocialite_markup("large"); ?&gt;</pre>
    351331                </label>';
    352332
     
    376356
    377357
    378 
    379         } // function
    380 
    381         function wpsocialite_classes()
    382         {
    383             $value = get_option('wpsocialite_classes');
    384             if($value == ''){
    385                 $value = 'article.post, .post, .page, .social-buttons';
    386             }
    387             # echo your form fields here containing the value received from get_option
    388 
    389             echo '<label for="wpsocialite_classes">
    390                     <input type="text" name="wpsocialite_classes" id="wpsocialite_classes" value="'.$value.'" class="large-text" >
    391                     Define the class that your posts and pages are wrapped in. If you are unsure, leave it as is.
    392                 </label>';
    393358
    394359        } // function
     
    457422                    'external_file' => false
    458423                ),
    459                 'pintrest' => array(
    460                     'name' => 'Pintrest',
    461                     'slug' => 'pintrest',
     424                'pinterest' => array(
     425                    'name' => 'Pinterest',
     426                    'slug' => 'pinterest',
    462427                    '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>',
    463428                    '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>',
Note: See TracChangeset for help on using the changeset viewer.