rveitch
11/11/2015 - 1:16 AM

Jetpack - Update Stats Permission Visibility by Role

Jetpack - Update Stats Permission Visibility by Role

<?php

/* Jetpack - Update Stats Permission Visibility by Role */
$jp_active = get_option('jetpack_activated');
if ( $jp_active = 1 ) {
  $stats_options = get_option( 'stats_options' );
  $stats_options['roles'] = Array ( 0 => 'administrator', 1 => 'author', 2 => 'contributor', 3 => 'editor', 4 => 'site-owner', );
  update_option('stats_options', $stats_options);
}