PluginProbe
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce / 2.2.8
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce v2.2.8
2.15.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 All 62 releases
hurrytimer / includes / Activator.php

Activator.php in HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce 2.2.8, at includes/Activator.php

61 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Hurrytimer;
3
4 /**
5 * Fired during plugin activation
6 *
7 * @link http://nabillemsieh.com
8 * @since 1.0.0
9 *
10 * @package Hurrytimer
11 * @subpackage Hurrytimer/includes
12 */
13
14 /**
15 * Fired during plugin activation.
16 *
17 * This class defines all code necessary to run during the plugin's activation.
18 *
19 * @since 1.0.0
20 * @package Hurrytimer
21 * @subpackage Hurrytimer/includes
22 * @author Nabil Lemsieh <contact@nabillemsieh.com>
23 */
24 class Activator
25 {
26
27 /**
28 * Short Description. (use period)
29 *
30 * Long Description.
31 *
32 * @since 1.0.0
33 */
34 public static function activate()
35 {
36 global $wpdb;
37
38 $table = "{$wpdb->prefix}hurrytimer_evergreen";
39 $charset_collate = $wpdb->get_charset_collate();
40
41 $sql = "CREATE TABLE {$table} (
42 id bigint(20) NOT NULL AUTO_INCREMENT,
43 countdown_id bigint(20) unsigned NOT NULL,
44 client_ip_address varchar(50) NOT NULL,
45 expired tinyint(1) unsigned DEFAULT NULL,
46 client_expires_at bigint(20) unsigned NOT NULL,
47 destroy_at timestamp NULL DEFAULT NULL,
48 PRIMARY KEY (id)
49 ) {$charset_collate}";
50
51 require_once ABSPATH . 'wp-admin/includes/upgrade.php';
52
53 dbDelta($sql);
54
55 add_option('hurrytimer_db_version', HURRYT_DB_VERSION);
56 add_option(HURRYT_OPTION_VERSION_KEY, HURRYT_VERSION);
57
58 }
59
60 }
61