Menu capability in WordPress

Question

Is it possible to specify two usergroups (e.g. admins and editors) into the admin menu capability field ? I tried the following but it doesnt work:

add_submenu_page(
     'my-top-level-handle',
     'Page title',
     'Sub-menu title',
      array('administrator', 'editor'),
     'my-submenu-handle',
     'my_magic_function'
);

error message:

Warning: Illegal offset type in isset or empty in C:wampwwwwordpresswp-includescapabilities.php on line 712

0
Omar Abid 8 months 2020-12-05T22:10:21-05:00 0 Answers 9 views 0

Leave an answer

Browse
Browse