Plugin Directory

Changeset 604437


Ignore:
Timestamp:
09/27/2012 01:57:16 AM (13 years ago)
Author:
graphical_force
Message:

Committing the trunk

Location:
get-user-info/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • get-user-info/trunk/getUserInfo.php

    r603438 r604437  
    33Plugin Name: Get user info
    44Plugin URI: http://wordpress.org/extend/plugins/get-user-info/
    5 Choose to display any of the following for any user: First and last name, avatar, or website. A title can be added along with a css class to allow styling if needed. Is available as a widget or shortcode. Ex. [userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" website="true"].
    6 Version: 1.0.8
     5Choose to display any of the following for any user: First and last name, avatar, description or website. A title can be added along with a css class to allow styling if needed. Is available as a widget or shortcode. Ex. [userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" description="true" website="true"].
     6Version: 1.0.9
    77Author: Jeff Freeman
    88Author URI: http://graphicalforce.com
     
    4040        $firstLast = apply_filters( 'widget_title', $instance['firstLast'] );
    4141        $avatar = apply_filters( 'widget_title', $instance['avatar'] );
     42        $description = apply_filters( 'widget_title', $instance['description'] );
    4243        $website = apply_filters( 'widget_title', $instance['website'] );
    4344        if ( $cssClass ) {
     
    5051               
    5152        $user = get_userdatabylogin($user);
    52         $user_description = $user->description;
    5353        $user_email = $user->user_email;
    5454        if ( $firstLast ) {
     
    5858        if ( $avatar ) {
    5959            $user_avatar = get_avatar($user_email);
     60        }
     61        if ( $description ) {
     62            $user_description = $user->description;
    6063        }
    6164        if ( $website ) {
     
    9497        $instance['firstLast'] = ($new_instance['firstLast']);
    9598        $instance['avatar'] = ($new_instance['avatar']);
     99        $instance['description'] = ($new_instance['description']);
    96100        $instance['website'] = ($new_instance['website']);
    97101
     
    124128        if ( isset( $instance[ 'avatar' ] ) ) {
    125129            $avatar = $instance['avatar'];
     130        }
     131        if ( isset( $instance[ 'description' ] ) ) {
     132            $description = $instance['description'];
    126133        }
    127134        if ( isset( $instance[ 'website' ] ) ) {
     
    162169                <tr valign="top">               
    163170                    <th scope="row">
     171                        <label for="<?php echo $this->get_field_id('description'); ?>"><?php _e('User description: '); ?></label>
     172                    </th>
     173                    <td>
     174                        <input id="<?php echo $this->get_field_id( 'description' ); ?>" name="<?php echo $this->get_field_name( 'description' ); ?>" type="checkbox" <?php checked($description, 'on' ); ?> />
     175                    </td>
     176                </tr>
     177                <tr valign="top">               
     178                    <th scope="row">
    164179                        <label for="<?php echo $this->get_field_id('website'); ?>"><?php _e('User website: '); ?></label>
    165180                    </th>
     
    188203            'name' => 'false',
    189204            'avatar' => 'false',
     205            'description' => 'false',
    190206            'website' => 'false',
    191207        ), $atts ) );
     
    195211        $firstLast = ($name);
    196212        $avatar = ($avatar);
     213        $description = ($description);
    197214        $website = ($website);
    198215        $user = get_userdatabylogin($user);
    199         $user_description = $user->description;
    200216        $user_email = $user->user_email;
    201217        if ( $firstLast === 'true' ) {
     
    205221        if ( $avatar === 'true' ) {
    206222            $user_avatar = get_avatar($user_email);
     223        }
     224        if ( $description === 'true' ) {
     225            $user_description = $user->description;
    207226        }
    208227        if ( $website === 'true' ) {
  • get-user-info/trunk/readme.txt

    r603439 r604437  
    11=== Get User Info ===
    22Contributors: graphical_force
    3 Tags: users, user
     3Tags: users, user, shortcode
    44Requires at least: 3.0
    55Tested up to: 3.4.2
    6 Stable tag: 1.0.8
     6Stable tag: 1.0.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Display the first and last name, avatar, or website of any user via widget or shortcode. Other options are title and/or a css class.
     10Display the first and last name, avatar, description, or website of any user via widget or shortcode. Other options are title and/or a css class.
    1111
    1212== Description ==
    1313
    14 Choose to display any of the following for any user: First and last name, avatar, or website. A title can be added along with a css class to allow styling if needed. Is available as a widget or shortcode. Use [userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" website="true"].
     14Choose to display any of the following for any user: First and last name, avatar, description or website. A title can be added along with a css class to allow styling if needed. Is available as a widget or shortcode. Use [userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" description="true" website="true"].
    1515
    1616== Installation ==
     
    18181. Upload `get-user-info` file to the `/wp-content/plugins/` directory
    19192. Activate the plugin through the 'Plugins' menu in WordPress
    20 3. Add a Get User Info widget to any sidebar and add a title, cssClass if needed then add the user name of the user you want to display. Check any other information you would like to display. You can also display the user info by using the following shortcode '[userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" website="true"]' (replace User Name with the user name that you want to display ex. [userinfo user="Bill" class="CssClass" title="My Title" name="true" avatar="true" website="true"]). Just use false in the shortcode or don't include it if you don't want it to display.
     203. Add a Get User Info widget to any sidebar and add a title, cssClass if needed then add the user name of the user you want to display. Check any other information you would like to display. You can also display the user info by using the following shortcode '[userinfo user="User Name" class="CssClass" title="My Title" name="true" avatar="true" description="true" website="true"]' (replace User Name with the user name that you want to display ex. [userinfo user="Bill" class="CssClass" title="My Title" name="true" avatar="true" description="true" website="true"]). Just use false in the shortcode or don't include it if you don't want it to display.
    2121
    2222== Screenshots ==
     
    2626
    2727== Changelog ==
     28
     29= 1.0.9 =
     30* Added the ability to add the description param to the shortcode or by checking the description box to show the users description in the widget.
    2831
    2932= 1.0.8 =
Note: See TracChangeset for help on using the changeset viewer.