Change WordPress user roles and capabilities › Forums › Bug Reports › Cannot change the plugins view › Reply To: Cannot change the plugins view
26/10/2013 at 15:21
#343
Vladimir
Keymaster
Quick turnaround how to provide ability to use “Mingle Forum” menu items to other WP users, not “administrator” only. Mingle Forum menu is created at the mingle-forum/wpf.class.php
file with this code starting from line #181.
add_menu_page(__("Mingle Forum - Options", "mingleforum"), "Mingle Forum", "mingle-admin", "mingle-forum", array(&$wpfa, "options"), WPFURL."images/logo.png");
add_submenu_page("mingle-forum", __("Mingle Forum - Options", "mingleforum"), __("Options", "mingleforum"), "mingle-admin", 'mingle-forum', array(&$wpfa, "options"));
add_submenu_page('mingle-forum', __('Ads', 'mingleforum'), __('Ads', 'mingleforum'), "mingle-admin", 'mfads', array(&$wpfa, "ads"));
add_submenu_page("mingle-forum", __("Skins", "mingleforum"), __("Skins", "mingleforum"), "mingle-admin", 'mfskins', array(&$wpfa, "skins"));
add_submenu_page("mingle-forum", __("Forum Structure - Categories & Forums", "mingleforum"), __("Forum Structure", "mingleforum"), "mingle-admin", 'mfstructure', array(&$wpfa, "structure"));
add_submenu_page("mingle-forum", __("Moderators", "mingleforum"), __("Moderators", "mingleforum"), "mingle-admin", 'mfmods', array(&$wpfa, "moderators"));
add_submenu_page("mingle-forum", __("User Groups", "mingleforum"), __("User Groups", "mingleforum"), "mingle-admin", 'mfgroups', array(&$wpfa, "usergroups"));
add_submenu_page("mingle-forum", __("About", "mingleforum"), __("About", "mingleforum"), "mingle-admin", 'mfabout', array(&$wpfa, "about"));
Original code has “administrator” string instead of “mingle-admin” inside. I replaced it for your convenience. Replace original code with the code above. Then add new user capability “mingle-admin” with “User Role Editor” and turn it on for selected roles. This way user with “mingle-admin” capability in his role will be capable to use Mingle Forum menu.