# tableberg/0.3.2/includes/Activator.php

Tableberg – Simple Gutenberg Table Block, version 0.3.2. 53 lines.

- Page: https://pluginprobe.com/plugins/tableberg/0.3.2/code/includes/Activator.php
- Raw: https://pluginprobe.com/plugins/tableberg/0.3.2/raw/includes/Activator.php
- Modified: 2024-02-17T06:46:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/0.3.2/code/includes/Activator.php#L10-L20`.

```php
<?php
/**
 * Fired during plugin activation
 *
 *  @package Tableberg
 */

namespace Tableberg;
use Tableberg\Utils\Utils;

/**
 * Fired during plugin activation.
 *
 * This class defines all code necessary to run during the plugin's activation.
 *
 * @since      1.0.2
 *  @package Tableberg
 * @author     Imtiaz Rayhan <imtiazrayhan@gmail.com>
 */
class Activator {

	/**
	 * Short Description. (use period)
	 *
	 * Long Description.
	 *
	 * @since    1.0.2
	 */
	public static function activate() {

		set_transient( '_welcome_redirect_tableberg', true, 60 );

		$individual_control = get_option( 'tableberg_individual_control', false );
		$block_properties   = get_option( 'tableberg_block_properties', false );
		$global_control     = get_option( 'tableberg_global_control', false );

		if ( ! $global_control ) {
			update_option( 'tableberg_global_control', Utils::global_control() );
		}
		if ( ! $individual_control ) {
			update_option( 'tableberg_individual_control', Utils::individual_control() );
		}
		if ( ! $block_properties ) {
			update_option( 'tableberg_block_properties', Utils::default_block_properties() );
		}

		if ( ! get_option( 'tableberg_version' ) ) {
			add_option( 'tableberg_version', Constants::plugin_version() );
		}
	}

}

```
