Skip to content

Add: filterable capability for admin menu#3

Merged
webgrafia merged 1 commit into
webgrafia:masterfrom
edwinsiebel:feat-add-filterable-capability
Jul 31, 2017
Merged

Add: filterable capability for admin menu#3
webgrafia merged 1 commit into
webgrafia:masterfrom
edwinsiebel:feat-add-filterable-capability

Conversation

@edwinsiebel
Copy link
Copy Markdown
Contributor

Hi,

to be able to enable the cookie and to change the text, one has to have the 'manage_options' capability. So, basically only an administrator can do this.

Our clients don't have this capability, and thus, cannot edit the cookie.

Would it be a nice feature to let the capability be filterable, so one can change this accordingly.

Filter name: ginger_admin_menu_capability

Example:
add_filter('ginger_admin_menu_capability', function($capability) {
return 'delete_users';
}, 10, 1);

Filter name: ginger_admin_menu_capability

Example:
add_filter('ginger_admin_menu_capability', function($capability) {
	return 'delete_users';
}, 10, 1);
@webgrafia webgrafia merged commit 9641530 into webgrafia:master Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants