BuddyPress Force profile Photo plugin forces users on a BuddyPress site to upload a profile photo before they can use any feature of the site. It's simple and effective.
It won't restrict the site admins, only the normal members are restricted from using site features if they do not upload a profile photo.
The new update includes support for excluding users joining via social networks.
Screenshots:-
Skipping url from the restriction/check:-
Version 1.0.6 & above allows skipping certain urls using the filter bp_force_profile_photo_skip. If the function attached to this filter returns true, the checks will be skipped.
Example 1:- Do not redirect on non BuddyPress pages
/** * Do not redirect users on non bp pages. * * @param bool $skip should we skip or redirect. * * @return bool */ function buddydev_skip_redirect_on_non_bp_pages( $skip ) { if ( ! is_buddypress() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_photo_skip', 'buddydev_skip_redirect_on_non_bp_pages' );
Example 2:- Skip Members directory from the check( Will not restrict user from visiting members directory)
/** * Example to show skipping urls from the BuddyPress Force Profile Photo plugin * * @param boolean $skip * * @return bool whether to skip or not? */ function buddydev_skip_urls_from_force_profile_photo( $skip ) { if ( bp_is_members_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_photo_skip', 'buddydev_skip_urls_from_force_profile_photo' );
Github Repo: – https://github.com/buddydev/bp-force-profile-photo