PHP 8.2.31
Preview: maintenance.php Size: 2.81 KB
//home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementor/includes/maintenance.php

<?php
namespace Elementor;

use Elementor\Core\Kits\Manager;
use Elementor\Core\Upgrade\Manager as Upgrade_Manager;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Elementor maintenance.
 *
 * Elementor maintenance handler class is responsible for setting up Elementor
 * activation and uninstallation hooks.
 *
 * @since 1.0.0
 */
class Maintenance {

	/**
	 * Activate Elementor.
	 *
	 * Set Elementor activation hook.
	 *
	 * Fired by `register_activation_hook` when the plugin is activated.
	 *
	 * @param bool $network_wide
	 * @since 1.0.0
	 * @access public
	 * @static
	 */
	public static function activation( $network_wide ) {
		wp_clear_scheduled_hook( 'elementor/tracker/send_event' );

		wp_schedule_event( time(), 'daily', 'elementor/tracker/send_event' );
		flush_rewrite_rules();

		if ( is_multisite() && $network_wide ) {
			static::create_default_kit(
				get_sites( [
					'fields' => 'ids',
				] )
			);

			return;
		}

		static::create_default_kit();
		static::insert_defaults_options();

		set_transient( 'elementor_activation_redirect', true, MINUTE_IN_SECONDS );
	}

	public static function insert_defaults_options() {
		$history = Upgrade_Manager::get_installs_history();
		if ( empty( $history ) ) {
			$default_options = [
				'elementor_font_display' => 'swap',
			];
			foreach ( $default_options as $option_name => $option_value ) {
				if ( \Elementor\Utils::is_empty( get_option( $option_name ) ) ) {
					add_option( $option_name, $option_value );
				}
			}
		}
	}

	public static function deactivation() {
		Api::get_deactivation_data();
	}

	/**
	 * Uninstall Elementor.
	 *
	 * Set Elementor uninstallation hook.
	 *
	 * Fired by `register_uninstall_hook` when the plugin is uninstalled.
	 *
	 * @since 1.0.0
	 * @access public
	 * @static
	 */
	public static function uninstall() {
		wp_clear_scheduled_hook( 'elementor/tracker/send_event' );

		Api::get_uninstalled_data();
	}

	/**
	 * Init.
	 *
	 * Initialize Elementor Maintenance.
	 *
	 * @since 1.0.0
	 * @access public
	 * @static
	 */
	public static function init() {
		register_activation_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'activation' ] );
		register_deactivation_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'deactivation' ] );
		register_uninstall_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'uninstall' ] );

		add_action( 'wpmu_new_blog', function ( $site_id ) {
			if ( ! is_plugin_active_for_network( ELEMENTOR_PLUGIN_BASE ) ) {
				return;
			}

			static::create_default_kit( [ $site_id ] );
		} );
	}

	/**
	 * @param array $site_ids
	 */
	private static function create_default_kit( array $site_ids = [] ) {
		if ( ! empty( $site_ids ) ) {
			foreach ( $site_ids as $site_id ) {
				switch_to_blog( $site_id );

				Manager::create_default_kit();

				restore_current_blog();
			}

			return;
		}

		Manager::create_default_kit();
	}
}

Directory Contents

Dirs: 11 × Files: 22

Name Size Perms Modified Actions
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
base DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
controls DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
elements DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
libraries DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
managers DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
settings DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
widgets DIR
- drwxr-xr-x 2026-06-12 02:39:37
Edit Download
8.67 KB lrw-r--r-- 2026-05-20 16:19:28
Edit Download
9.79 KB lrw-r--r-- 2025-10-21 16:51:06
Edit Download
2.99 KB lrw-r--r-- 2023-04-23 15:22:46
Edit Download
10.96 KB lrw-r--r-- 2025-03-17 17:28:54
Edit Download
2.70 KB lrw-r--r-- 2023-04-23 15:22:46
Edit Download
15.89 KB lrw-r--r-- 2026-02-02 14:52:12
Edit Download
4.11 KB lrw-r--r-- 2026-06-08 16:48:02
Edit Download
8.48 KB lrw-r--r-- 2025-03-17 17:28:54
Edit Download
62.53 KB lrw-r--r-- 2025-03-17 17:28:54
Edit Download
40.03 KB lrw-r--r-- 2026-04-20 15:03:48
Edit Download
2.57 KB lrw-r--r-- 2023-04-23 15:22:46
Edit Download
11.16 KB lrw-r--r-- 2025-10-21 16:51:06
Edit Download
2.81 KB lrw-r--r-- 2025-03-17 17:28:54
Edit Download
16.68 KB lrw-r--r-- 2026-05-26 12:54:34
Edit Download
7.93 KB lrw-r--r-- 2026-05-20 16:19:28
Edit Download
4.16 KB lrw-r--r-- 2026-01-20 13:22:36
Edit Download
7.81 KB lrw-r--r-- 2025-08-05 18:00:00
Edit Download
8.91 KB lrw-r--r-- 2025-09-15 14:10:16
Edit Download
17.00 KB lrw-r--r-- 2025-11-10 16:25:22
Edit Download
3.44 KB lrw-r--r-- 2025-10-21 16:51:06
Edit Download
9.99 KB lrw-r--r-- 2025-12-04 22:09:04
Edit Download
24.88 KB lrw-r--r-- 2026-06-08 16:48:02
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).