Skip to content

Instantly share code, notes, and snippets.

@Zodiac1978
Created June 11, 2024 07:33
Show Gist options
  • Save Zodiac1978/33897dcb8bdbd72d01700bb83d3658d6 to your computer and use it in GitHub Desktop.
Save Zodiac1978/33897dcb8bdbd72d01700bb83d3658d6 to your computer and use it in GitHub Desktop.
Add two more user roles only for viewing and managing Koko Analytics
<?php
/* Add two more user roles for viewing and managing Koko Analytics */
/* See: https://www.kokoanalytics.com/kb/how-to-give-other-wordpress-users-access-to-the-koko-analytics-dashboard-page/ */
add_role( 'koko_analytics_viewer', 'Koko Analytics Viewer', array( 'read' => true, 'view_koko_analytics' => true ) );
add_role( 'koko_analytics_manager', 'Koko Analytics Manager', array( 'read' => true, 'view_koko_analytics' => true, 'manage_koko_analytics' => true ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment