[Plugin: WordPress GPS] Capabilities problem
-
I have found that if your blog has few user roles which has different capabilities then it may not show GPS menu in admin.
The reason is if role dont have ‘edit_post‘ capability it wont show.
Solution:
- Add ‘edit_post‘ capability to role
Or:
- Open plugins include/gb_gps.php file.
- Find function “admin_menu“.
- Change line from:
add_menu_page( GB_GPS_ADMIN_MENU_PAGE_TITLE, GB_GPS_ADMIN_MENU_MENU_TITLE, ‘edit_post’, self::MENU_SLUG, array(&$this, ‘display_admin_menu’) );
To:
add_menu_page( GB_GPS_ADMIN_MENU_PAGE_TITLE, GB_GPS_ADMIN_MENU_MENU_TITLE, ‘read’, self::MENU_SLUG, array(&$this, ‘display_admin_menu’) ); - Find function “display_admin_menu“.
Change line from:
if(!current_user_can(‘edit_post’)) {
To:
if(!current_user_can(‘read’)) {
- The topic ‘[Plugin: WordPress GPS] Capabilities problem’ is closed to new replies.