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

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

- Page: https://pluginprobe.com/plugins/templately/1.1.1/code/core/class-installer.php
- Raw: https://pluginprobe.com/plugins/templately/1.1.1/raw/core/class-installer.php
- Modified: 2020-07-17T09:51:44+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.1/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' ] );
	}
}

```
