Feature request: add filter hook to allow editors viewing stats
-
Hi,
I always have to hack the plugin to allow editors to access the dashboard stats.I propose the following modifications:
In function a360_request_handler:
$cap = apply_filters( 'a360_dashboard_capability', 'manage_options' ); if (!empty($_GET['a360_action']) && current_user_can( $cap )) {
In function a360_admin_menu:
First, remove the wrapper
current_user_can
, asadd_*_page
already has a capability.And then use this to the dashboard page:
add_dashboard_page( __('Dashboard', 'analytics360'), __('Analytics360°', 'analytics360'), apply_filters( 'a360_dashboard_capability', 'manage_options' ), basename(__FILE__), 'a360_dashboard' );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Feature request: add filter hook to allow editors viewing stats’ is closed to new replies.