PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0
Elementor Website Builder – more than just a page builder v3.1.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / includes / maintenance.php

maintenance.php in Elementor Website Builder – more than just a page builder 3.1.0, at includes/maintenance.php

71 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 /**
9 * Elementor maintenance.
10 *
11 * Elementor maintenance handler class is responsible for setting up Elementor
12 * activation and uninstallation hooks.
13 *
14 * @since 1.0.0
15 */
16 class Maintenance {
17
18 /**
19 * Activate Elementor.
20 *
21 * Set Elementor activation hook.
22 *
23 * Fired by `register_activation_hook` when the plugin is activated.
24 *
25 * @since 1.0.0
26 * @access public
27 * @static
28 */
29 public static function activation( $network_wide ) {
30 wp_clear_scheduled_hook( 'elementor/tracker/send_event' );
31
32 wp_schedule_event( time(), 'daily', 'elementor/tracker/send_event' );
33 flush_rewrite_rules();
34
35 if ( is_multisite() && $network_wide ) {
36 return;
37 }
38
39 set_transient( 'elementor_activation_redirect', true, MINUTE_IN_SECONDS );
40 }
41
42 /**
43 * Uninstall Elementor.
44 *
45 * Set Elementor uninstallation hook.
46 *
47 * Fired by `register_uninstall_hook` when the plugin is uninstalled.
48 *
49 * @since 1.0.0
50 * @access public
51 * @static
52 */
53 public static function uninstall() {
54 wp_clear_scheduled_hook( 'elementor/tracker/send_event' );
55 }
56
57 /**
58 * Init.
59 *
60 * Initialize Elementor Maintenance.
61 *
62 * @since 1.0.0
63 * @access public
64 * @static
65 */
66 public static function init() {
67 register_activation_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'activation' ] );
68 register_uninstall_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'uninstall' ] );
69 }
70 }
71