Page Permissions Filter Hook
-
Hello,
This is just a Feature Request.
It looks like the admin pages are set with
manage_options
capability. This is the highest capability a user can have, and only the WordPress Administrator and Site Administrator roles have this.Could a filter hook be put in place on the page capabilities here:
custom-facebook-feed\custom-facebook-feed-admin.php FN cff_menu()
So that a developer could hook into this and lower the given capability to something other than
manage_options
? It could look something like this…function cff_menu() { add_menu_page( '', 'Facebook Feed', apply_filters( 'cff_admin_page_cap', 'manage_options', $page = 'toplevel' ), 'cff-top', 'cff_settings_page' ); add_submenu_page( 'cff-top', 'Settings', 'Settings', apply_filters( 'cff_admin_page_cap', 'manage_options', $page = 'cff-top' ), 'cff-top', 'cff_settings_page' ); } add_action('admin_menu', 'cff_menu'); //Add styling page function cff_styling_menu() { add_submenu_page( 'cff-top', 'Customize', 'Customize', apply_filters( 'cff_admin_page_cap', 'manage_options', $page = 'cff-style' ), 'cff-style', 'cff_style_page' ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Page Permissions Filter Hook’ is closed to new replies.