Plugin Directory

Changeset 1004025


Ignore:
Timestamp:
10/08/2014 06:33:48 PM (11 years ago)
Author:
miled
Message:
  • Fix an issue where wsl did not display the right user avatar.
  • Fix an issue where providers icons wasn't showing in sites using https.
  • Fix an issue with basic insights, where users counts by age wasn't showing.
  • Add WordPress to list of supported provider.
Location:
wordpress-social-login/trunk
Files:
3 added
3 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • wordpress-social-login/trunk/includes/admin/components/login-widget/wsl.components.loginwidget.sidebar.php

    r1002140 r1004025  
    3030                        <h4 style="cursor: default;border-bottom:1px solid #ccc;font-size: 13px;"><?php _wsl_e("Widget Customization", 'wordpress-social-login') ?></h4>
    3131
    32                         <p style="margin:10px;font-size: 13px;" align="justify">
     32                        <p style="margin:10px;font-size: 13px;">
    3333                            <?php _wsl_e("On this section you can fully customize <b>WordPress Social Login Widget</b> and define the way you want it to look and behave", 'wordpress-social-login') ?>.
    3434                        </p>
    3535
    36                         <p style="margin:10px;font-size: 13px;" align="justify">
     36                        <p style="margin:10px;font-size: 13px;">
    3737                            <?php _wsl_e("<b>WordPress Social Login Widget</b> will be generated into the comments, login and register forms enabling your website vistors and customers to login via social networks", 'wordpress-social-login') ?>.
    3838                        </p>
    3939
    40                         <p style="margin:10px;">
    41                             <?php _wsl_e("If this widget does not show up on your custom theme or you want to add it somewhere else then refer to the next section", 'wordpress-social-login') ?>.
    42                         </p>
    43 
    4440                        <p style="margin:10px;"> 
    45                             <?php _wsl_e('For more information about the WSL Widget, refer to the online userguide <b><a href="http://hybridauth.sourceforge.net/wsl/customize.html?" target="_blank">widget customization</a></b> and <b><a href="http://hybridauth.sourceforge.net/wsl/themes.html?" target="_blank">widget themes</a></b>', 'wordpress-social-login') ?>.
    46                         </p>
    47 
    48                         <h4 style="cursor: default;border-bottom:1px solid #ccc;"><?php _wsl_e("Custom integration", 'wordpress-social-login') ?></h4>
    49 
    50                         <p style="margin:10px;">
    51                             <?php _wsl_e("If you want to add the social login widget to another location in your theme, you can insert the following code in that location", 'wordpress-social-login') ?>:
    52                             <pre style="width: 380px;background-color: #FFFFE0;border:1px solid #E6DB55; border-radius: 3px;padding: 10px;margin-top:15px;margin-left:10px;"> &lt;?php do_action( 'wordpress_social_login' ); ?&gt; </pre>
    53                             <?php _wsl_e("Or, for posts and pages", 'wordpress-social-login') ?>:
    54                             <pre style="width: 380px;background-color: #EDEFF4;border:1px solid #6B84B4; border-radius: 3px;padding: 10px;margin-top:15px;margin-left:10px;">[wordpress_social_login]</pre>
    55                         </p>
    56 
    57                         <p style="margin:10px;">
    58                             <?php _wsl_e('<b>Tip:</b>', 'wordpress-social-login') ?>.
    59                             <br />
    60                             <?php _wsl_e('You can use <a href="http://wordpress.org/extend/plugins/html-javascript-adder/" target="_blank">HTML Javascript Adder</a> plugin in combination with WSL to display the Widget in your website sidebar by using the shortcode <b>[wordpress_social_login]</b>', 'wordpress-social-login') ?>.
     41                            <?php _wsl_e('For more information about the WSL Widget, refer to the online userguide <b><a href="http://hybridauth.sourceforge.net/wsl/widget.html" target="_blank">Widget Customization</a></b> and <b><a href="http://hybridauth.sourceforge.net/wsl/themes.html" target="_blank">Widget Themes</a></b>', 'wordpress-social-login') ?>.
    6142                        </p>
    6243
     
    6748                            <br />
    6849
    69                             <strong><?php _wsl_e("Please, do not try to connect with the Widget here, it won't work", 'wordpress-social-login') ?></strong>!
     50                            <strong><?php _wsl_e("Do not try to connect with the Widget here, it won't work", 'wordpress-social-login') ?></strong>.
    7051                        </p>
    7152 
     
    7354                            <?php echo wsl_render_login_form(); ?>
    7455                        </div>
     56
     57                        <h4 style="cursor: default;border-bottom:1px solid #ccc;"><?php _wsl_e("Custom integration", 'wordpress-social-login') ?></h4>
     58
     59                        <p style="margin:10px;">
     60                            <?php _wsl_e("If this widget does not show up on your custom theme or if you want to add it to another location in your website, you can insert the following code in that location", 'wordpress-social-login') ?>:
     61                            <pre style="width: 380px;background-color: #FFFFE0;border:1px solid #E6DB55; border-radius: 3px;padding: 10px;margin-top:15px;margin-left:10px;"> &lt;?php do_action( 'wordpress_social_login' ); ?&gt; </pre>
     62                            <?php _wsl_e("For posts and pages, you may used this shortcode", 'wordpress-social-login') ?>:
     63                            <pre style="width: 380px;background-color: #EDEFF4;border:1px solid #6B84B4; border-radius: 3px;padding: 10px;margin-top:15px;margin-left:10px;">[wordpress_social_login]</pre>
     64                        </p>
     65
     66                        <p style="margin:10px;">
     67                            <b><?php _wsl_e('Note', 'wordpress-social-login') ?>:</b>
     68                            <br />
     69                            <?php _wsl_e('WSL Widget will only show up for non connected users', 'wordpress-social-login') ?>.
     70                        </p>
     71
     72                        <p style="margin:10px;">
     73                            <b><?php _wsl_e('Tip', 'wordpress-social-login') ?>:</b>
     74                            <br />
     75                            <?php _wsl_e('You can use <a href="http://wordpress.org/extend/plugins/html-javascript-adder/" target="_blank">HTML Javascript Adder</a> plugin in combination with WSL to display the Widget in your website sidebar by using the shortcode [wordpress_social_login]', 'wordpress-social-login') ?>.
     76                        </p>
    7577                    </div>
    7678                </div>
  • wordpress-social-login/trunk/includes/admin/components/networks/wsl.components.networks.basicinsights.php

    r1002140 r1004025  
    7676                        </tr>
    7777                    </table>
    78                    
     78
    7979                    <!-- Insights by gender -->
    8080                    <?php
    81                         $data = wsl_get_stored_hybridauth_user_profiles_count_by_field( 'age' ); 
     81                        $data = wsl_get_stored_hybridauth_user_profiles_count_by_field( 'gender' ); 
    8282                    ?>
    8383                    <h4 style="border-bottom:1px solid #ccc"><?php _wsl_e("By gender", 'wordpress-social-login') ?></h4>
     84                    <table width="90%">
     85                        <?php
     86                            foreach( $data as $item ){
     87                                if( ! $item->gender ) $item->gender = "Unknown";
     88                            ?>
     89                                <tr>
     90                                    <td width="60%">
     91                                        <?php echo ucfirst( $item->gender ); ?>
     92                                    </td>
     93                                    <td>
     94                                        <?php echo $item->items; ?>
     95                                    </td>
     96                                </tr>
     97                            <?php
     98                            }
     99                        ?>
     100                    </table>
     101
     102                    <!-- Insights by age -->
     103                    <?php
     104                        $data = wsl_get_stored_hybridauth_user_profiles_count_by_field( 'age' );
     105                    ?>
     106                    <h4 style="border-bottom:1px solid #ccc"><?php _wsl_e("By age", 'wordpress-social-login') ?></h4>
    84107                    <table width="90%">
    85108                        <?php
  • wordpress-social-login/trunk/includes/admin/components/networks/wsl.components.networks.setup.php

    r1002724 r1004025  
    287287                            </table>
    288288                        <?php endif; ?>
     289
     290                        <?php if ( $provider_id == "WordPress" ) : ?>
     291                            <table style="text-align: center;margin-bottom:12px;">
     292                                <td><a class="span4 thumbnail" href="http://hybridauth.sf.net/userguide/img/setup/wordpress/1.png" target="_blank"><img src="http://hybridauth.sf.net/userguide/img/setup/wordpress/1.png"></a></td>
     293                                <td><a class="span4 thumbnail" href="http://hybridauth.sf.net/userguide/img/setup/wordpress/2.png" target="_blank"><img src="http://hybridauth.sf.net/userguide/img/setup/wordpress/2.png"></a></td>
     294                                <td><a class="span4 thumbnail" href="http://hybridauth.sf.net/userguide/img/setup/wordpress/3.png" target="_blank"><img src="http://hybridauth.sf.net/userguide/img/setup/wordpress/3.png"></a></td>
     295                            </table>
     296                        <?php endif; ?>
    289297                    </div>
    290298
  • wordpress-social-login/trunk/includes/admin/wsl.admin.ui.php

    r1002140 r1004025  
    538538                    <li><?php _wsl_e('WSL Widget is now more flexible than before and can be <a href="http://hybridauth.sourceforge.net/wsl/themes.html?" target="_blank">fully customized</a> to fit you website theme', 'wordpress-social-login') ?>.</li>
    539539                    <li><?php _wsl_e('WSL is now updated to work with the latest apis changes of the supported social networks', 'wordpress-social-login') ?>.</li>
    540                     <li><?php _wsl_e('Introducing three new providers : <a href="https://www.reddit.com" target="_blank">Reddit</a>, <a href="https://disqus.com" target="_blank">Disqus</a> and <a href="http://pixelpin.co.uk/" target="_blank">PixelPin</a>', 'wordpress-social-login') ?>.</li>
     540                    <li><?php _wsl_e('Introducing four new providers : <a href="https://wordpress.com" target="_blank">WordPress.com</a>, <a href="https://disqus.com" target="_blank">Disqus</a>, <a href="https://www.reddit.com" target="_blank">Reddit</a>and <a href="http://pixelpin.co.uk/" target="_blank">PixelPin</a>', 'wordpress-social-login') ?>.</li>
    541541                    <li><?php _wsl_e('WSL <a href="http://hybridauth.sourceforge.net/wsl/developer.html" target="_blank">Hooks</a> has been reworked and few hooks have been depreciated in favour of new ones', 'wordpress-social-login') ?>.</li>
    542542                    <li><?php _wsl_e('A number of bugfixes, small enhancements and visual updates', 'wordpress-social-login') ?>.</li>
  • wordpress-social-login/trunk/includes/services/wsl.user.avatar.php

    r1002140 r1004025  
    6868    if( $user_id )
    6969    {
    70         $user_thumbnail = get_user_meta( $user_id, 'wsl_current_user_image', true );
     70        $user_thumbnail = wsl_get_user_custom_avatar( $user_id );
    7171
    7272        if( $user_thumbnail )
     
    113113                if( $user_data !== false )
    114114                {
    115                     $user_thumbnail = get_user_meta( $args ['item_id'], 'wsl_user_image', true );
     115                    $user_thumbnail = wsl_get_user_custom_avatar( $args['item_id'] );
    116116
    117117                    //Retrieve Avatar
  • wordpress-social-login/trunk/includes/services/wsl.user.data.php

    r1002140 r1004025  
    3636
    3737    return $wpdb->get_var( $sql );
     38}
     39
     40// --------------------------------------------------------------------
     41
     42function wsl_get_user_custom_avatar( $user_id )
     43{
     44    $user_avatar = get_user_meta( $user_id, 'wsl_current_user_image', true );
     45
     46    if( ! $user_avatar )
     47    {
     48        $user_avatar = get_user_meta( $user_id, 'wsl_user_image', true );
     49    }
     50
     51    return $user_avatar;
    3852}
    3953
  • wordpress-social-login/trunk/includes/settings/wsl.providers.php

    r1002140 r1004025  
    6767    ),
    6868    ARRAY(
    69         "provider_id"       => "Live",
    70         "provider_name"     => "Windows Live",
    71         "require_client_id" => true,
    72         "new_app_link"      => "https://account.live.com/developers/applications/create",
    73 
    74         "cat"               => "pleasedie",
     69        "provider_id"       => "WordPress",
     70        "provider_name"     => "WordPress",
     71        "require_client_id" => true,
     72        "callback"          => true,
     73        "new_app_link"      => "https://developer.wordpress.com/apps/new/",
     74
     75        "cat"               => "blogging",
    7576    ),
    7677    ARRAY(
     
    8081
    8182        "cat"               => "pleasedie",
    82     ),
    83     ARRAY(
    84         "provider_id"       => "Foursquare",
    85         "provider_name"     => "Foursquare",
    86         "callback"          => true,
    87         "require_client_id" => true,
    88         "new_app_link"      => "https://www.foursquare.com/oauth/",
    89 
    90         "cat"               => "microblogging",
    9183    ),
    9284    ARRAY(
     
    9890    ),
    9991    ARRAY(
    100         "provider_id"       => "AOL",
    101         "provider_name"     => "AOL",
    102         "new_app_link"      => null,
    103 
    104         "cat"               => "pleasedie",
    105     ),
    106     ARRAY(
    107         "provider_id"       => "Vkontakte",
    108         "provider_name"     => "Vkontakte",
    109         "callback"          => true,
    110         "require_client_id" => true,
    111         "new_app_link"      => "http://vk.com/developers.php",
    112 
    113         "cat"               => "socialnetworks",
     92        "provider_id"       => "Disqus",
     93        "provider_name"     => "Disqus",
     94        "require_client_id" => true,
     95        "callback"          => true,
     96        "new_app_link"      => "https://disqus.com/api/applications/",
     97
     98        "cat"               => "misc",
     99    ),
     100    ARRAY(
     101        "provider_id"       => "Instagram",
     102        "provider_name"     => "Instagram",
     103        "callback"          => true,
     104        "require_client_id" => true,
     105        "new_app_link"      => "http://instagr.am/developer/clients/manage/",
     106
     107        "cat"               => "media",
     108    ),
     109    ARRAY(
     110        "provider_id"       => "Reddit",
     111        "provider_name"     => "Reddit",
     112        "require_client_id" => true,
     113        "callback"          => true,
     114        "new_app_link"      => "https://ssl.reddit.com/prefs/apps",
     115
     116        "cat"               => "socialnetworks",
     117    ),
     118    ARRAY(
     119        "provider_id"       => "Foursquare",
     120        "provider_name"     => "Foursquare",
     121        "callback"          => true,
     122        "require_client_id" => true,
     123        "new_app_link"      => "https://www.foursquare.com/oauth/",
     124
     125        "cat"               => "microblogging",
    114126    ),
    115127    ARRAY(
     
    121133    ),
    122134    ARRAY(
    123         "provider_id"       => "Instagram",
    124         "provider_name"     => "Instagram",
    125         "callback"          => true,
    126         "require_client_id" => true,
    127         "new_app_link"      => "http://instagr.am/developer/clients/manage/",
    128 
    129         "cat"               => "media",
    130     ),
    131     ARRAY(
    132135        "provider_id"       => "Identica",
    133136        "provider_name"     => "Identica",
     
    206209    ),
    207210    ARRAY(
     211        "provider_id"       => "Vkontakte",
     212        "provider_name"     => "Vkontakte",
     213        "callback"          => true,
     214        "require_client_id" => true,
     215        "new_app_link"      => "http://vk.com/developers.php",
     216
     217        "cat"               => "socialnetworks",
     218    ),
     219    ARRAY(
    208220        "provider_id"       => "Mailru",
    209221        "provider_name"     => "Mailru",
     
    233245    ),
    234246    ARRAY(
    235         "provider_id"       => "Reddit",
    236         "provider_name"     => "Reddit",
    237         "require_client_id" => true,
    238         "callback"          => true,
    239         "new_app_link"      => "https://ssl.reddit.com/prefs/apps",
    240 
    241         "cat"               => "socialnetworks",
    242     ),
    243     ARRAY(
    244         "provider_id"       => "Disqus",
    245         "provider_name"     => "Disqus",
    246         "require_client_id" => true,
    247         "callback"          => true,
    248         "new_app_link"      => "https://disqus.com/api/applications/",
    249 
    250         "cat"               => "misc",
    251     ),
    252 
    253 // Paypal needs further testing..
    254     // ARRAY(
    255         // "provider_id"       => "Paypal",
    256         // "provider_name"     => "Paypal",
    257         // "require_client_id" => true,
    258         // "callback"          => true,
    259         // "new_app_link"      => "https://developer.paypal.com/webapps/developer/applications/myapps",
    260 
    261         // "cat"               => "misc",
    262     // ),
    263 
     247        "provider_id"       => "AOL",
     248        "provider_name"     => "AOL",
     249        "new_app_link"      => null,
     250
     251        "cat"               => "pleasedie",
     252    ),
     253    ARRAY(
     254        "provider_id"       => "Live",
     255        "provider_name"     => "Windows Live",
     256        "require_client_id" => true,
     257        "new_app_link"      => "https://account.live.com/developers/applications/create",
     258
     259        "cat"               => "pleasedie",
     260    ),
    264261    ARRAY(
    265262        "provider_id"       => "PixelPin",
  • wordpress-social-login/trunk/includes/widgets/wsl.auth.widget.php

    r1002140 r1004025  
    276276function wsl_add_stylesheets()
    277277{
    278     if( ! wp_style_is( 'wsl_css', 'registered' ) ) {
     278    if( ! wp_style_is( 'wsl_css', 'registered' ) )
     279    {
    279280        wp_register_style( "wsl_css", WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . "/assets/css/style.css" );
    280281    }
     
    283284}
    284285
    285 add_action( 'login_head', 'wsl_add_stylesheets' );
    286 add_action( 'wp_head'   , 'wsl_add_stylesheets' );
     286add_action( 'wp_enqueue_scripts', 'wsl_add_stylesheets' );
    287287
    288288// --------------------------------------------------------------------
  • wordpress-social-login/trunk/readme.txt

    r1002144 r1004025  
    7373== Changelog ==
    7474
     75= 2.2.2 =
     76
     77* Fix an issue where wsl did not display the right user avatar.
     78* Fix an issue where providers icons wasn't showing in sites using https.
     79* Fix an issue with basic insights, where users counts by age wasn't showing.
     80* Add WordPress to list of supported provider.
     81
    7582= 2.2.1 =
    7683
  • wordpress-social-login/trunk/wp-social-login.php

    r1002140 r1004025  
    44Plugin URI: http://hybridauth.sourceforge.net/wsl/index.html
    55Description: Allow your visitors to comment and login with social networks such as Twitter, Facebook, Google, Yahoo and more.
    6 Version: 2.2.1
     6Version: 2.2.2
    77Author: Miled
    88Author URI: http://hybridauth.sourceforge.net/wsl/index.html
     
    5555@ session_start(); // shhhtt keept it a secret
    5656
    57 $WORDPRESS_SOCIAL_LOGIN_VERSION = "2.2.1";
     57$WORDPRESS_SOCIAL_LOGIN_VERSION = "2.2.2";
    5858
    5959$_SESSION["wsl::plugin"] = "WordPress Social Login " . $WORDPRESS_SOCIAL_LOGIN_VERSION;
     
    7676
    7777/**
    78 * Define WSL constants, if not defined in 'wordpress-social-login-custom.php'
     78* Define WSL constants, if not already defined
    7979*/
    8080defined( 'WORDPRESS_SOCIAL_LOGIN_ABS_PATH' )
     
    8282
    8383defined( 'WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL' )
    84     || define( 'WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL', WP_PLUGIN_URL . '/wordpress-social-login' );
     84    || define( 'WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL', plugins_url() . '/wordpress-social-login' );
    8585
    8686defined( 'WORDPRESS_SOCIAL_LOGIN_HYBRIDAUTH_ENDPOINT_URL' )
     
    137137* Loads the plugin's translated strings.
    138138*
    139 * Note: In case you want to use another domain, you may define this function in 'wordpress-social-login-custom.php'
     139* Note: In case you want to use another domain, you may redefine this function
    140140*
    141141* http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
Note: See TracChangeset for help on using the changeset viewer.