Skip to content

Add filter to members_content_permissions_meta_box function for customizing roles #1

helgatheviking opened this Issue Sep 15, 2012 · 1 comment

2 participants


I have a client who is easily confused and I'd like the content control metabox that appears on each post to only display certain roles to chose from.

In the members_content_permissions_meta_box() function you display a checkbox for every role in the global $wp_roles. Would it be possible to add a filter just before the foreach so that I can customize which roles are displayed in the metabox?

Like so:

/* Loop through each of the available roles. */
$roles = apply_filters( 'members_content_permissions_meta_box_roles', $wp_roles->role_names );

foreach ( $roles as $role => $name )

Added in this commit: 7d00090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.