How to disable gamipress logs
-
Hello,
Please how can I disablee all gamipress logs, I dont want any logs recorded in database since I used code to award points. I want all gamipress logs Patterns to be disabled.
// Award 50 ngx-tokens when a post is published function gamipress_award_tokens_on_post_publish($new_status, $old_status, $post) { if ('post' !== $post->post_type) { return; } if (!is_user_logged_in()) { return; } $current_user_id = get_current_user_id(); $user_roles = get_userdata($current_user_id)->roles; // Exclude site admins and authors if (in_array('administrator', $user_roles) || in_array('author', $user_roles)) { return; } if ('publish' === $new_status && 'publish' !== $old_status) { gamipress_award_points_to_user($current_user_id, 50, 'ngx-tokens', '+50 tokens for publishing a new post'); } } add_action('transition_post_status', 'gamipress_award_tokens_on_post_publish', 10, 3);
I use example code above to award points but I dont want recording of logs in database.
Thanks
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘How to disable gamipress logs’ is closed to new replies.