hi Brajesh,
I’ve got your small but excellent plugin for locking activity entries working nicely, on my site.
https://buddydev.com/plugins/bp-lock-unlock-activity/
It feels like it’s lacking some configuration. Because the admin can always open/close an activity, even a simple “allow user to open/close?” would do it. Any chance of this being implemented…?
R.
Hi Richard,
Can you please help me understand it better.Do you want us to put a default status(open/close) by default?
Regards
Brajeshnope. I would like to be able to say either:
1. admin and user can both un/lock their own (admin=all) activity.
This (1. above) is how the plugin behaves at the moment and is very good, I just don’t want the user to be able to unlock their activity after the admin has locked it. It is ok if the user can *lock* their activity. The simplest solution may be to not permit the user to unlock their activity, as per (2.) below.
2. admin *only* can unlock/open activity. <- this is what I need.
Does that make sense?
- This reply was modified 5 years, 5 months ago by Richard Foley.
Hi Richard,
Thank you for the clarification.
I am requesting @ravisharma to test and put an update for you.
Thank you
BrajeshHello Richard,
Please download the latest version of plugin “BuddyPress Lock UnLock Activity” and use the following code which allows only site admins can lock and unlock an activity.
/** * Only allow site admins to lock and unlock activity * * @param bool $can True or false. * * @return bool */ function buddydev_user_can_lock_unlock_activity( $can ) { return is_super_admin(); } add_filter( 'bp_lock_unlock_user_can_update_activity', 'buddydev_user_can_lock_unlock_activity' );
You can put this code in “bp-custom.php” or active theme “functions.php” file. Please let me know if it works or not.
Regards
Ravihi Brajesh and Ravi,
have installed as instructed and the code looks like it’s working perfectly, and exactly as needed.
Many thanks for your support!
R
The topic ‘ [Resolved] BP (un-)lock activity for admin only?’ is closed to new replies.