WordPress plugin intelligence profile

User Photo

Allows a user to associate a photo with their account and for this photo to be displayed in their posts and comments.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.6
Current version0.9.10
WordPress coverageTested up to WordPress 4.6
Minimum stackWP 3.0.5 · PHP —
Directory statusactive
Last directory update28 Nov 20178y ago
Active installations3K+Adoption metric — not a quality score
WordPress.org rating4.3 / 5 from 20 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records User Photo version 0.9.10 as active, updated 8y ago and tested up to WordPress 4.6.

Overview

About this plugin

Allows a user to associate a profile photo with their account through their “Your Profile” page. Admins may

add a user profile photo by accessing the “Edit User” page. Uploaded images are resized to fit the dimensions specified

on the options page; a thumbnail image correspondingly is also generated.

User photos may be displayed within a post or a comment to

help identify the author. New template tags introduced are:

  • userphoto_the_author_photo()
  • userphoto_the_author_thumbnail()
  • userphoto_comment_author_photo()
  • userphoto_comment_author_thumbnail()

Important: all of these “template tags” must appear inside of PHP script blocks (see examples below).

The first two should be placed in the posts loop near the_author(), and the second two in the comments

loop near comment_author() (or their respective equivalents). Furthermore, userphoto_the_author_photo()

e. sidebar) if $authordata is set.

The output of these template tags may be modified by passing four parameters: $before, $after, $attributes, and $default_src,

as in: userphoto_the_author_photo($before, $after, $attributes, $default_src).

If the user photo exists (or $default_src is supplied), then the text provided in the $before and $after parameters is respectively

prefixed and suffixed to the generated img tag (a common pattern in WordPress). If attributes are provided in the $attributes

parameter, then they are returned as attributes of the generated img element. For example: userphoto_the_author_photo('', '', array(style => 'border:0'))

1 release are these two new template tags:

  • userphoto($user, $before = '', $after = '', $attributes = array(), $default_src = '')
  • userphoto_thumbnail($user, $before = '', $after = '', $attributes = array(), $default_src = '')

By using these, it is uneccessary to set the global $authordata to display a photo. Just pass $authordata, $curauth or

9), pass in a user ID or a user login name.

Here’s an example that shows a few ways of inserting a user’s photo into the post loop:

//this will display the user’s avatar if they don’t have a user photo,

>

>

>

php userphoto_the_author_photo( '<b>Photo of me: ', '</b>', array('class' => 'photo'), get_template_directory_uri(). >

If you want to display the user’s photo in the sidebar, just get the user ID or object and pass it into userphoto() or userphoto_thumbnail() like this:

>

If you want to display a user’s photo their author page, you may do this:

>

9 the boolean function userphoto_exists($user) has been introduced which returns true if the user has a photo and false if they do not.

Argument $user may be user object, ID, or login name. This function can be used along with avatars:

>

Or if the new “Serve Avatar as Fallback” option is turned on, then the avatar will be served by any of the regular calls to display the user photo:

>

Additionally, all of the regular function calls to display the user photo may be done away with alltogether if the new “Override Avatar with User Photo”

option is enabled:

>

Both options “Serve Avatar as Fallback” and “Override Avatar with User Photo” require that the ‘Avatar Display’ setting under Discussion be set to “Show”.

Uploaded images may be moderated by administrators via the “Edit User” page.

Localizations included for Spanish, German, Dutch, Polish, Russian, French, Hungarian, Brazilian Portuguese, Italian, and Catalan.

If you value this plugin, please donate to ensure that it may continue to be maintained and improved.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • images
  • photos
  • users
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.6

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.6.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.6
Minimum requirementsWordPress 3.0.5 · PHP not listed
Update activity28 Nov 20178y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.