Plugin Support
Swathi S
(@swathiswpfront)
Hi @klishb,
You can use the ‘WPFRONT_NOTIFICATION_BAR_EDIT_CAPABILITY’ constant to change the capability checked by the Notification Bar.
For more information please go through the below link
https://wordpress.org/support/topic/feature-request-custom-settings-page-editor-access/
Thanks!
Thread Starter
klishb
(@klishb)
Can this be implemented as a hook or only by defining in wp-config.php?
Plugin Support
Swathi S
(@swathiswpfront)
You can also use the ‘wpfront_notification_bar_edit_capability’ filter to set custom capability.
Thanks!
Thread Starter
klishb
(@klishb)
So far this is not working for me. I defined it in wp-config.php in the same area I have other things defined. I then added it as a custom capability using PublishPress Capabilities. I then granted that capability to the role for the user I’m testing with.
The end result is I don’t see the Settings menu at all and if I try to access the notification bar settings page I’m told access denied. Not sure what I’m missing. I’ve triple checked my work. Everything looks right.
Thread Starter
klishb
(@klishb)
It’s definitely changing it when I define it in wp-config.php because as the admin I lose access. Even if I add that capability to the Administrator role I still can’t access it. As soon as I remove that line from wp-config.php it works again.
You can define the constant anywhere, not necessarily in wp-config.
Please make sure that, your capability is enabled for the role, use a role editor plugin like “WPFront User Role Editor”.
Another option is to use the PRO version of this plugin, which has a predefined set of custom capabilities to control all functionalities. It is also integrated with “WPFront User Role Editor”, so that you can see the capabilities in a different section.
Thread Starter
klishb
(@klishb)
As I mentioned, I tried that using the PublishPress Capabilities plugin. I also tried Members plugin. I don’t use “WPFront User Role Editor” on my sites, but it should be doing the same thing.
I agree, it should be doing the same thing. Also it should be working at this point.
Thread Starter
klishb
(@klishb)
Plugin Support
Swathi S
(@swathiswpfront)
The filter is the alternate way to set custom capability.
Your previous code wasn’t working may be due to the invisible characters in the code.
-
This reply was modified 4 years, 2 months ago by
Swathi S.