# templately/1.1.0/core/class-installer.php

Templately – Elementor &amp; Gutenberg Template Library: 6500+ Free &amp; Pro Ready Templates And Cloud!, version 1.1.0. 26 lines.

- Page: https://pluginprobe.com/plugins/templately/1.1.0/code/core/class-installer.php
- Raw: https://pluginprobe.com/plugins/templately/1.1.0/raw/core/class-installer.php
- Modified: 2020-06-16T10:03:54+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/templately/1.1.0/code/core/class-installer.php#L10-L20`.

```php
<?php

namespace Templately;

class Installer {
    // For activate the plugin
    public static function activate( $network_wide ) {
        flush_rewrite_rules();
        if ( is_multisite() && $network_wide ) {
			return;
        }
        set_transient( 'templately_activation_redirect', true, MINUTE_IN_SECONDS );
    }

    public static function deactivate() {
        // For deactivate the plugin
    }

	/**
	 * Init.
	 */
	public static function init() {
		register_activation_hook( TEMPLATELY_FILE, [ __CLASS__, 'activate' ] );
	}
}

```
