Correct use of Roles and Capabilities with add_submenu_page()
-
This is referring to a discussion I had on stack exchange
I was toldadd_submenu_page('slug_of_your_parent_menu', 'my title', 'your menu title','<strong>administrator</strong>', 'submenu_slug', 'function_to_display_this_submenu');
was incorrect because I used a role ( ‘administrator’ ) instead of a Capability.
I referenced the codex examples which at the time used ‘administrator’ in place of $capability.
I was told that the codex was incorrect and that he changed it.
I am asking because I am working on plugin which uses ‘administrator’ and it is working without error thus far. Can someone confirm that it is improper to use a role?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Correct use of Roles and Capabilities with add_submenu_page()’ is closed to new replies.