PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / trunk
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI vtrunk
8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 7.8.7 7.8.6 7.8.5 All 44 releases
gamipress / includes / admin / settings / logs.php

logs.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI trunk, at includes/admin/settings/logs.php

104 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin Logs Settings
4 *
5 * @package GamiPress\Admin\Settings\Logs
6 * @author GamiPress <contact@gamipress.com>, Ruben Garcia <rubengcdev@gmail.com>
7 * @since 1.3.7
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 /**
13 * Logs Settings meta boxes
14 *
15 * @since 1.0.0
16 * @updated 1.6.5 Added log_all_events setting and only_log_events_with_listeners setting has been removed
17 *
18 * @param array $meta_boxes
19 *
20 * @return array
21 */
22 function gamipress_settings_logs_meta_boxes( $meta_boxes ) {
23
24 $meta_boxes['logs-patterns-settings'] = array(
25 'title' => gamipress_dashicon( 'editor-alignleft' ) . __( 'Logs', 'gamipress' ),
26 'fields' => apply_filters( 'gamipress_logs_patterns_settings_fields', array(
27 'log_patterns_title' => array(
28 'name' => __( 'Logs Patterns', 'gamipress' ),
29 'description' => __( 'From this settings you can modify the default pattern for upcoming log entries of each category.', 'gamipress' ),
30 'type' => 'title',
31 ),
32 'trigger_log_pattern' => array(
33 'name' => __( 'Activity trigger', 'gamipress' ),
34 'description' => __( 'Used to register user activity triggered. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{trigger_type}', '{trigger_type_key}', '{count}', '{site_title}' ) ),
35 'type' => 'text',
36 'default' => __( '{user} triggered {trigger_type} (x{count})', 'gamipress' ),
37 ),
38 'points_earned_log_pattern' => array(
39 'name' => __( 'Points earned', 'gamipress' ),
40 'description' => __( 'Used when user earns points. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{points}', '{points_type}', '{total_points}', '{site_title}' ) ),
41 'type' => 'text',
42 'default' => __( '{user} earned {points} {points_type} for a new total of {total_points} {points_type}', 'gamipress' ),
43 ),
44 'points_deducted_log_pattern' => array(
45 'name' => __( 'Points deducted', 'gamipress' ),
46 'description' => __( 'Used when user gets a deduction of points. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{points}', '{points_type}', '{total_points}', '{site_title}' ), 'deduct' ),
47 'type' => 'text',
48 'default' => __( '{user} deducted {points} {points_type} for a new total of {total_points} {points_type}', 'gamipress' ),
49 ),
50 'points_expended_log_pattern' => array(
51 'name' => __( 'Points expended', 'gamipress' ),
52 'description' => __( 'Used when user expend an amount of points. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{points}', '{points_type}', '{total_points}', '{site_title}' ), 'expend' ),
53 'type' => 'text',
54 'default' => __( '{user} expended {points} {points_type} for a new total of {total_points} {points_type}', 'gamipress' ),
55 ),
56 'requirement_complete_log_pattern' => array(
57 'name' => __( 'Points award/step complete', 'gamipress' ),
58 'description' => __( 'Used when user completes a points award or step. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{achievement}', '{achievement_type}', '{site_title}' ) ),
59 'type' => 'text',
60 'default' => __( '{user} completed the {achievement_type} {achievement}', 'gamipress' ),
61 ),
62 'achievement_earned_log_pattern' => array(
63 'name' => __( 'Achievement earned', 'gamipress' ),
64 'description' => __( 'Used when user earns an achievement. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{achievement}', '{achievement_type}', '{site_title}' ) ),
65 'type' => 'text',
66 'default' => __( '{user} unlocked the {achievement} {achievement_type}', 'gamipress' ),
67 ),
68 'rank_earned_log_pattern' => array(
69 'name' => __( 'Rank earned', 'gamipress' ),
70 'description' => __( 'Used when user ranks to a new rank. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{user}', '{rank}', '{rank_type}', '{site_title}' ) ),
71 'type' => 'text',
72 'default' => __( '{user} ranked to {rank_type} {rank}', 'gamipress' ),
73 ),
74 'points_awarded_log_pattern' => array(
75 'name' => __( 'Points awarded', 'gamipress' ),
76 'description' => __( 'Used when an admin awards a user with points. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{admin}', '{user}', '{points}', '{points_type}', '{total_points}', '{site_title}' ) ),
77 'type' => 'text',
78 'default' => __( '{admin} awarded {user} {points} {points_type} for a new total of {total_points} {points_type}', 'gamipress' ),
79 ),
80 'points_revoked_log_pattern' => array(
81 'name' => __( 'Points revoked', 'gamipress' ),
82 'description' => __( 'Used when an admin revokes points of a user. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{admin}', '{user}', '{points}', '{points_type}', '{total_points}', '{site_title}' ) ),
83 'type' => 'text',
84 'default' => __( '{admin} revoked {user} {points} {points_type} for a new total of {total_points} {points_type}', 'gamipress' ),
85 ),
86 'achievement_awarded_log_pattern' => array(
87 'name' => __( 'Achievement awarded', 'gamipress' ),
88 'description' => __( 'Used when an admin awards a user with an achievement. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{admin}', '{user}', '{achievement}', '{achievement_type}', '{site_title}' ) ),
89 'type' => 'text',
90 'default' => __( '{admin} awarded {user} with the the {achievement} {achievement_type}', 'gamipress' ),
91 ),
92 'rank_awarded_log_pattern' => array(
93 'name' => __( 'Rank awarded', 'gamipress' ),
94 'description' => __( 'Used when an admin ranks a user to a new rank. Available tags:', 'gamipress' ) . gamipress_get_log_pattern_tags_html( array( '{admin}', '{user}', '{rank}', '{rank_type}', '{site_title}' ) ),
95 'type' => 'text',
96 'default' => __( '{admin} ranked {user} to {rank_type} {rank}', 'gamipress' ),
97 ),
98 ) )
99 );
100
101 return $meta_boxes;
102
103 }
104 add_filter( 'gamipress_settings_logs_meta_boxes', 'gamipress_settings_logs_meta_boxes' );