PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 7.9.6
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v7.9.6
8.0.5 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 All 47 releases
gamipress / includes / admin / upgrades / 1.3.7.php

1.3.7.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI 7.9.6, at includes/admin/upgrades/1.3.7.php

58 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * 1.3.7 Upgrades
4 *
5 * @package GamiPress\Admin\Upgrades\1.3.7
6 * @since 1.3.7
7 */
8 // Exit if accessed directly
9 if( !defined( 'ABSPATH' ) ) exit;
10
11 /**
12 * Return 1.3.7 as last required upgrade
13 *
14 * @return string
15 */
16 function gamipress_137_is_last_required_upgrade() {
17
18 return '1.3.7';
19
20 }
21 add_filter( 'gamipress_get_last_required_upgrade', 'gamipress_137_is_last_required_upgrade', 137 );
22
23 /**
24 * Process 1.3.7 upgrades
25 *
26 * @param string $stored_version
27 *
28 * @return string
29 */
30 function gamipress_137_upgrades( $stored_version ) {
31
32 if ( version_compare( $stored_version, '1.3.7', '>=' ) ) {
33 return $stored_version;
34 }
35
36 // Setup new default GamiPress options
37 $gamipress_settings = ( $exists = get_option( 'gamipress_settings' ) ) ? $exists : array();
38
39 // Initialize points deduct completed emails settings
40 if ( ! isset( $gamipress_settings['points_deduct_completed_email_content'] ) ) {
41
42 $gamipress_settings['points_deduct_completed_email_subject'] = __( '[{site_title}] {user_first}, you lost {points} {points_type}', 'gamipress' );
43 $gamipress_settings['points_deduct_completed_email_content'] = '<h2>' . __( 'Oops {user_first}!', 'gamipress' ) . '</h2>' . "\n"
44 . __( 'You lost {points} {points_type} for "{label}".', 'gamipress' ) . "\n"
45 . __( 'Your new {points_type} balance is:', 'gamipress' ) . "\n"
46 . '{points_balance}' . "\n\n"
47 . __( 'Best regards', 'gamipress' );
48
49 }
50
51 update_option( 'gamipress_settings', $gamipress_settings );
52
53 $stored_version = '1.3.7';
54
55 return $stored_version;
56
57 }
58 add_filter( 'gamipress_process_upgrades', 'gamipress_137_upgrades', 137 );