I may have been a bit vague in my documentation, but ‘capability_required_to_edit’ is not a capability you will add to any user.
First, select a capability to which you would like to restrict editing of glances. This could be done by using an existing capability or creating a new one via your role management plugin. Let’s say (with native roles) you want to restrict editing of glances to administrators or editors, then you could select a capability such as ‘edit_others_pages’. Alternatively, you could assign the capability of ‘edit_glances’ to a specific role.
Secondly, after a role holds the capability, you will restrict editing to that role only by defining the above constant in wp-config.php
, replacing 'capability_required_to_edit'
with the specific capability you are using for this restriction.
Now, only users with a role possessing that capability will be able to edit their own glances.
Default glances for a user can be set by using the gt_default_glances
filter. However, once a user visits their dashboard with the plugin active, a set of glances will be written to the database. After that happens, any edits to their glances would need to happen via their account, as the filter only sets the defaults on the first visit.
Hope that clarifies things a bit. Let me know if I can assist further.