PluginProbe
Tableberg – Simple Gutenberg Table Block / 0.4.1
Tableberg – Simple Gutenberg Table Block v0.4.1
1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 trunk 0.0.2 0.2.1 0.3.2 0.3.3 0.4.1 0.5.0 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 0.5.8 All 41 releases
tableberg / includes / Activator.php

Activator.php in Tableberg – Simple Gutenberg Table Block 0.4.1, at includes/Activator.php

49 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Fired during plugin activation
5 *
6 * @package Tableberg
7 */
8
9 namespace Tableberg;
10
11 use Tableberg\Utils\Utils;
12
13 /**
14 * Fired during plugin activation.
15 *
16 * This class defines all code necessary to run during the plugin's activation.
17 *
18 * @since 1.0.2
19 * @package Tableberg
20 * @author Imtiaz Rayhan <imtiazrayhan@gmail.com>
21 */
22 class Activator
23 {
24 public static function activate()
25 {
26
27 set_transient('_welcome_redirect_tableberg', true, 60);
28
29 $individual_control = get_option('tableberg_individual_control', false);
30 $block_properties = get_option('tableberg_block_properties', false);
31 $global_control = get_option('tableberg_global_control', false);
32
33 if (!$global_control) {
34 update_option('tableberg_global_control', Utils::global_control());
35 }
36 if (!$individual_control) {
37 update_option('tableberg_individual_control', Utils::individual_control());
38 }
39 if (!$block_properties) {
40 update_option('tableberg_block_properties', Utils::default_block_properties());
41 }
42
43 update_option('tableberg_version', Constants::plugin_version());
44
45 update_option('tableberg_installDate', date('Y-m-d h:i:s'));
46 add_option('tableberg_review_notify', 'no');
47 }
48 }
49