PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 2.2.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v2.2.9
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
templately / includes / Core / Maintenance.php

Maintenance.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 2.2.9, at includes/Core/Maintenance.php

51 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Templately\Core;
4
5 class Maintenance {
6 /**
7 * Init Maintenance
8 *
9 * @since 2.0.1
10 * @return void
11 */
12 public static function init(){
13 register_activation_hook( TEMPLATELY_PLUGIN_BASENAME, [ __CLASS__, 'activation' ] );
14 register_uninstall_hook( TEMPLATELY_PLUGIN_BASENAME, [ __CLASS__, 'uninstall' ] );
15 add_action('plugins_loaded', array(__CLASS__, 'plugin_redirect'), 90);
16 }
17
18 /**
19 * Runs on activation
20 *
21 * @since 2.0.1
22 * @return void
23 */
24 public static function activation(){
25 update_option('templately_do_activation_redirect', true);
26 }
27
28 /**
29 * Runs on uninstallation.
30 *
31 * @since 2.0.1
32 * @return void
33 */
34 public static function uninstall(){
35
36 }
37
38 /**
39 * Redirect on installation.
40 *
41 * @since 2.2.7
42 * @return void
43 */
44 public static function plugin_redirect(){
45 if (get_option('templately_do_activation_redirect', false)) {
46 delete_option('templately_do_activation_redirect');
47 wp_safe_redirect(admin_url('admin.php?page=templately&path=elementor/packs'));
48 }
49 }
50 }
51