One User Avatar | User Profile Picture
WordPress currently only allows you to use custom avatars that are uploaded through Gravatar. One User Avatar enables you to use any photo uploaded into your Media Library as an avatar. This means you use the same uploader and library as your posts. No extra folders or image editing functions are necessary. This plugin is a fork of WP User Avatar v2.2.16. One User Avatar also lets you: Upload your own Default Avatar in your One User Avatar settings. Show the user’s Gravatar avatar or Default Avatar if the user doesn’t have a One User Avatar image. Disable Gravatar avatars and use only local avatars. Use the [avatar_upload] shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users. Use the [avatar] shortcode in your posts. These shortcodes will work with any theme, whether it has avatar support or not. Allow Contributors and Subscribers to upload their own avatars. Limit upload file size and image dimensions for Contributors and Subscribers. Copyright One User Avatar Copyright (c) 2023 One Designs https://onedesigns.com/ License: GPLv2 Source: https://github.com/onedesigns/one-user-avatar One User Avatar is based on WP User Avatar v2.2.16 Copyright (c) 2020-2021 ProfilePress https://profilepress.net/ Copyright (c) 2014-2020 Flippercode https://www.flippercode.com/ Copyright (c) 2013-2014 Bangbay Siboliban http://bangbay.com/ License: GPLv2 Source: https://github.com/profilepress/wp-user-avatar One User Avatar is distributed under the terms of the GNU GPL This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Advanced Settings Add One User Avatar to your own profile edit page You can use the [avatar_upload] shortcode to add a standalone uploader to any page. It’s best to use this uploader by itself and without other profile fields. If you’re building your own profile edit page with other fields, One User Avatar is automatically added to the show_user_profile and edit_user_profile hooks. If you’d rather have One User Avatar in its own section, you could add another hook: do_action( 'edit_user_avatar', $current_user ); Then, to add One User Avatar to that hook and remove it from the other hooks outside of the administration panel, you would add this code to the functions.php file of your theme: function my_avatar_filter() { // Remove from show_user_profile hook remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) ); remove_action( 'show_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) ); // Remove from edit_user_profile hook remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) ); remove_action( 'edit_user_profile', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) ); // Add to edit_user_avatar hook add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_action_show_user_profile' ) ); add_action( 'edit_user_avatar', array( 'wp_user_avatar', 'wpua_media_upload_scripts' ) ); } // Loads only outside of administration panel if ( ! is_admin() ) { add_action( 'init','my_avatar_filter' ); } HTML Wrapper You can change the HTML wrapper of the One User Avatar section by using the functions wpua_before_avatar and wpua_after_avatar. By default, the avatar code is structured like this: Avatar Edit Image Original Size Thumbnail Default Avatar Undo To strip out the div container and h3 heading, you would add the following filters to the functions.php file in your theme: remove_action( 'wpua_before_avatar', 'wpua_do_before_avatar' ); remove_action( 'wpua_after_avatar', 'wpua_do_after_avatar' ); To add your own wrapper, you could create something like this: function my_before_avatar() { echo ' '; } add_action( 'wpua_before_avatar', 'my_before_avatar' ); function my_after_avatar() { echo ' '; } add_action( 'wpua_after_avatar', 'my_after_avatar' ); This would output: Edit Image Original Size Thumbnail Default Avatar Undo
Top keywords
- user38×5.35%
- avatar33×4.65%
- avatar'17×2.39%
- action15×2.11%
- user avatar15×2.11%
- add14×1.97%
- 'wpua12×1.69%
- remove9×1.27%
- user avatar'9×1.27%
- avatar' 'wpua8×1.13%
- upload8×1.13%
- edit7×0.99%
User Switching
This plugin allows you to quickly swap between user accounts in WordPress at the click of a button. You’ll be instantly logged out and logged in as your desired user. This is handy for helping customers on WooCommerce sites, membership sites, testing environments, or for any site where administrators need to switch between multiple accounts. Features Switch user: Instantly switch to any user account from the Users screen. Switch back: Instantly switch back to your originating account. Switch off: Log out of your account but retain the ability to instantly switch back in again. Compatible with Multisite, WooCommerce, BuddyPress, and bbPress. Compatible with most membership and user management plugins. Compatible with most two-factor authentication solutions (see the FAQ for more info). Approved for use on enterprise-grade WordPress platforms such as Altis and WordPress VIP. Note: User Switching supports versions of WordPress up to three years old, and PHP version 7.4 or higher. Security Only users with the ability to edit other users can switch user accounts. By default this is only Administrators on single site installations, and Super Admins on Multisite installations. Passwords are not (and cannot be) revealed. Uses the cookie authentication system in WordPress when remembering the account(s) you’ve switched from and when switching back. Implements the nonce security system in WordPress, meaning only those who intend to switch users can switch. Full support for user session validation where appropriate. Full support for HTTPS. Usage Visit the Users menu in WordPress and you’ll see a Switch To link in the list of action links for each user. Click this and you will immediately switch into that user account. You can switch back to your originating account via the Switch back link on each dashboard screen or in your profile menu in the WordPress toolbar. See the FAQ for information about the Switch Off feature. Other Plugins I maintain several other plugins for developers. Check them out: Query Monitor is the developer tools panel for WordPress WP Crontrol lets you view and control what’s happening in the WP-Cron system Thanks The time that I spend maintaining this plugin and others is in part sponsored by: Automattic ServMask WP Staging All my kind sponsors on GitHub Privacy Statement User Switching does not send data to any third party, nor does it include any third party resources, nor will it ever do so. User Switching makes use of browser cookies in order to allow users to switch to another account. Its cookies operate using the same mechanism as the authentication cookies in WordPress core, which means their values contain the user’s user_login field in plain text which should be treated as potentially personally identifiable information (PII) for privacy and regulatory reasons (GDPR, CCPA, etc). The names of the cookies are: wordpress_user_sw_{COOKIEHASH} wordpress_user_sw_secure_{COOKIEHASH} wordpress_user_sw_olduser_{COOKIEHASH} See also the FAQ for some questions relating to privacy and safety when switching between users. Accessibility Statement User Switching aims to be fully accessible to all of its users. It implements best practices for web accessibility, outputs semantic and structured markup, adheres to the default styles and accessibility guidelines of WordPress, uses the accessibility APIs provided by WordPress and web browsers where appropriate, and is fully accessible via keyboard. User Switching should adhere to Web Content Accessibility Guidelines (WCAG) 2.0 at level AA when used with a recent version of WordPress where its admin area itself adheres to these guidelines. If you’ve experienced or identified an accessibility issue in User Switching, please open a thread in the User Switching plugin support forum and I’ll address it swiftly.