PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 7.9.8
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v7.9.8
8.0.4 8.0.3 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 All 46 releases
gamipress / templates / email-settings.php

email-settings.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI 7.9.8, at templates/email-settings.php

76 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Email settings template
4 *
5 * This template can be overridden by copying it to yourtheme/gamipress/email-settings.php
6 */
7 global $gamipress_template_args;
8
9 // Shorthand
10 $a = $gamipress_template_args;
11 $user_settings = gamipress_get_user_email_settings( $a['user_id'] ); ?>
12
13 <div class="gamipress-email-settings">
14
15 <?php
16 /**
17 * Before render email settings
18 *
19 * @since 2.2.1
20 *
21 * @param array $template_args Template received arguments
22 */
23 do_action( 'gamipress_before_render_email_settings', $a ); ?>
24
25 <?php // Loop sections ?>
26 <?php foreach( $a['email_settings'] as $section => $section_args ) : ?>
27
28 <table class="gamipress-email-settings-table gamipress-email-settings-table-<?php echo esc_attr( $section ); ?>">
29 <thead>
30 <tr>
31 <th class="gamipress-email-settings-header-setting"><?php echo $section_args['label']; ?></th>
32 <th class="gamipress-email-settings-header-yes"><?php _e( 'Yes', 'gamipress' ); ?></th>
33 <th class="gamipress-email-settings-header-no"><?php _e( 'No', 'gamipress' ); ?></th>
34 </tr>
35 </thead>
36 <tbody>
37 <?php // Loop each section settings ?>
38 <?php foreach( $section_args['settings'] as $setting => $label ) :
39 $user_setting = ( isset( $user_settings[$setting] ) ? $user_settings[$setting] : 'yes' ); ?>
40 <tr id="gamipress-email-settings-<?php echo esc_attr( $setting ); ?>">
41 <td class="gamipress-email-settings-column-setting">
42 <div class="gamipress-email-settings-loader" style="display: none;">
43 <div class="gamipress-email-settings-saving"><?php _e( 'Saving...', 'gamipress' ); ?></div>
44 <div class="gamipress-email-settings-saved"><?php _e( 'Saved!', 'gamipress' ); ?></div>
45 </div>
46 <?php echo $label; ?>
47 </td>
48 <td class="gamipress-email-settings-column-yes">
49 <div class="gamipress-email-settings-radio">
50 <input type="radio" name="gamipress_email_settings[<?php echo esc_attr( $setting ); ?>]" value="yes" <?php checked( $user_setting, 'yes' ); ?>>
51 </div>
52 </td>
53 <td class="gamipress-email-settings-column-no">
54 <div class="gamipress-email-settings-radio">
55 <input type="radio" name="gamipress_email_settings[<?php echo esc_attr( $setting ); ?>]" value="no" <?php checked( $user_setting, 'no' ); ?>>
56 </div>
57 </td>
58 </tr>
59 <?php endforeach; ?>
60 </tbody>
61 </table>
62
63 <?php endforeach; ?>
64
65 <?php
66 /**
67 * After render email settings
68 *
69 * @since 2.2.1
70 *
71 * @param array $template_args Template received arguments
72 */
73 do_action( 'gamipress_after_render_email_settings', $a ); ?>
74
75 </div>
76