WPFront
  • Home
  • Plugins
    • Notification Bar Plugin
      • Plugin Ideas
      • Plugin Settings
      • Plugin FAQ
    • Scroll Top Plugin
      • Plugin Settings
      • Plugin FAQ
    • User Role Editor Plugin
      • Plugin Documentation
      • Plugin Settings
      • Plugin FAQ
    • Paddle Gateway Plugin
  • Go Pro
  • Support
    • Documentation
    • FAQ
  • Affiliates
  • Contact
  • Login
  • Cart
December 28, 2016 at 9:21 pm #44079
peter verbeek
Participant

Syam,

I got this answer from the Buddypress Docs plugin people.

You can filter who can create docs by adding your own callback on the bp_docs_current_user_can_create_in_context hook.
https://github.com/boonebgorges/buddypress-docs/blob/master/includes/functions.php#L326

(You can also add a filter to WP’s capability system if that’s more familiar to you.)
Then, you can make whatever rules you need. If the user can’t create a doc, the button will not appear, and the user will not be able to access the create docs page.

Unfortunately I am not a programmer so the github link does not help me.

Then they mention to add a filter to WP’s capability system!
No idea how to do that. Isn’t that what your WPFRONT provides me?
So now I know that what I want (hide the “create doc” button based on role) can be done but I still don’t know how.

Can WPFRONT help me?
Thanks
Peter

Log In
Lost Password

Search Topics

Documentation

FAQ
Roles List Add Role Edit Role Delete Role Restore Role Add or Remove Capability Assign/Migrate Users Posts/Pages Extended Permissions Custom Post Type Permissions Navigation Menu Permissions Widget Permissions Admin Menu Editor Media/Attachment File Permissions User Level Permissions Content Restriction Shortcodes Login Redirect Export Roles Import Roles Bulk Edit Settings Multisite Roles List Multisite Add New Role Multisite Edit Role Multisite Delete Role Multisite Restore Role Multisite Sync Roles Multisite Settings WordPress Capabilities Actions and Filters Installation Instructions