Exemple #1
0
/**
 * Deletes all stats when the admin option has been selected.
 *
 * @return bool Whether the stats get reseted.
 */
function appthemes_reset_stats()
{
    if (!current_theme_supports('app-stats') || !current_user_can('manage_options')) {
        return false;
    }
    return APP_Post_Statistics::reset_stats();
}