Changeset 604437
- Timestamp:
- 09/27/2012 01:57:16 AM (13 years ago)
- Location:
- get-user-info/trunk
- Files:
-
- 4 edited
-
getUserInfo.php (modified) (10 diffs)
-
readme.txt (modified) (3 diffs)
-
screenshot-1.png (modified) (previous)
-
screenshot-2.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
get-user-info/trunk/getUserInfo.php
r603438 r604437 3 3 Plugin Name: Get user info 4 4 Plugin 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. 85 Choose 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"]. 6 Version: 1.0.9 7 7 Author: Jeff Freeman 8 8 Author URI: http://graphicalforce.com … … 40 40 $firstLast = apply_filters( 'widget_title', $instance['firstLast'] ); 41 41 $avatar = apply_filters( 'widget_title', $instance['avatar'] ); 42 $description = apply_filters( 'widget_title', $instance['description'] ); 42 43 $website = apply_filters( 'widget_title', $instance['website'] ); 43 44 if ( $cssClass ) { … … 50 51 51 52 $user = get_userdatabylogin($user); 52 $user_description = $user->description;53 53 $user_email = $user->user_email; 54 54 if ( $firstLast ) { … … 58 58 if ( $avatar ) { 59 59 $user_avatar = get_avatar($user_email); 60 } 61 if ( $description ) { 62 $user_description = $user->description; 60 63 } 61 64 if ( $website ) { … … 94 97 $instance['firstLast'] = ($new_instance['firstLast']); 95 98 $instance['avatar'] = ($new_instance['avatar']); 99 $instance['description'] = ($new_instance['description']); 96 100 $instance['website'] = ($new_instance['website']); 97 101 … … 124 128 if ( isset( $instance[ 'avatar' ] ) ) { 125 129 $avatar = $instance['avatar']; 130 } 131 if ( isset( $instance[ 'description' ] ) ) { 132 $description = $instance['description']; 126 133 } 127 134 if ( isset( $instance[ 'website' ] ) ) { … … 162 169 <tr valign="top"> 163 170 <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"> 164 179 <label for="<?php echo $this->get_field_id('website'); ?>"><?php _e('User website: '); ?></label> 165 180 </th> … … 188 203 'name' => 'false', 189 204 'avatar' => 'false', 205 'description' => 'false', 190 206 'website' => 'false', 191 207 ), $atts ) ); … … 195 211 $firstLast = ($name); 196 212 $avatar = ($avatar); 213 $description = ($description); 197 214 $website = ($website); 198 215 $user = get_userdatabylogin($user); 199 $user_description = $user->description;200 216 $user_email = $user->user_email; 201 217 if ( $firstLast === 'true' ) { … … 205 221 if ( $avatar === 'true' ) { 206 222 $user_avatar = get_avatar($user_email); 223 } 224 if ( $description === 'true' ) { 225 $user_description = $user->description; 207 226 } 208 227 if ( $website === 'true' ) { -
get-user-info/trunk/readme.txt
r603439 r604437 1 1 === Get User Info === 2 2 Contributors: graphical_force 3 Tags: users, user 3 Tags: users, user, shortcode 4 4 Requires at least: 3.0 5 5 Tested up to: 3.4.2 6 Stable tag: 1.0. 86 Stable tag: 1.0.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 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.10 Display 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. 11 11 12 12 == Description == 13 13 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"].14 Choose 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"]. 15 15 16 16 == Installation == … … 18 18 1. Upload `get-user-info` file to the `/wp-content/plugins/` directory 19 19 2. 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.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" 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. 21 21 22 22 == Screenshots == … … 26 26 27 27 == 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. 28 31 29 32 = 1.0.8 =
Note: See TracChangeset
for help on using the changeset viewer.