PluginProbe
Tableberg – Simple Gutenberg Table Block / 0.2.1
Tableberg – Simple Gutenberg Table Block v0.2.1
1.1.5 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 All 42 releases
tableberg / includes / Activator.php

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

57 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 * Fired during plugin activation
4 *
5 * @package Tableberg
6 */
7
8 namespace Tableberg;
9
10 use Tableberg\Utils;
11 use Tableberg;
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 /**
25 * Short Description. (use period)
26 *
27 * Long Description.
28 *
29 * @since 1.0.2
30 */
31 public static function activate() {
32
33 set_transient( '_welcome_redirect_tableberg', true, 60 );
34
35 require_once TABLEBERG_DIR_PATH . 'includes/Utils.php';
36
37 $individual_control = get_option( 'tableberg_individual_control', false );
38 $block_properties = get_option( 'tableberg_block_properties', false );
39 $global_control = get_option( 'tableberg_global_control', false );
40
41 if ( ! $global_control ) {
42 update_option( 'tableberg_global_control', Utils::global_control() );
43 }
44 if ( ! $individual_control ) {
45 update_option( 'tableberg_individual_control', Utils::individual_control() );
46 }
47 if ( ! $block_properties ) {
48 update_option( 'tableberg_block_properties', Utils::default_block_properties() );
49 }
50
51 if ( ! get_option( 'tableberg_version' ) ) {
52 add_option( 'tableberg_version', Tableberg\Constants::plugin_version() );
53 }
54 }
55
56 }
57