Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Based on: http://erikshosting.com/wordpress-tips-code/analytics-360-for-editors/
- Usage: change this function in analytics360.php around line #635..
- Backup: you can rename the old function to a360_admin_menu_old()
- and simply add the new one instead of replace it
- Addendum: in function a360_request_handler() - line #210,
- change "manage_options" to "publish_posts"
- */
- function a360_admin_menu() {
- if (current_user_can('manage_options')) {
- add_options_page(
- __('Settings', 'analytics360'),
- __('Analytics360°', 'analytics360'),
- 'manage_options',
- basename(__FILE__),
- 'a360_settings_form'
- );
- add_dashboard_page(
- __('Dashboard', 'analytics360'),
- __('Analytics360°', 'analytics360'),
- 'manage_options',
- basename(__FILE__),
- 'a360_dashboard'
- );
- } elseif (current_user_can('publish_posts')) {
- add_options_page(
- __('Analytics360°', 'analytics360'),
- 'publish_posts',
- basename(__FILE__),
- 'a360_settings_form'
- );
- add_dashboard_page(
- __('Dashboard', 'analytics360'),
- __('Analytics360°', 'analytics360'),
- 'publish_posts',
- basename(__FILE__),
- 'a360_dashboard'
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement