SILENT KILLERPanel

Current Path: > home > transcarter > > www > wp-content > plugins > wp-optimize > > includes


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter//www/wp-content/plugins/wp-optimize//includes

NameTypeSizeLast ModifiedActions
blockui Directory - -
fragments Directory - -
list-tables Directory - -
tables Directory - -
backward-compatibility-functions.php File 3311 bytes July 17 2025 21:05:49.
class-re-smush-it-task.php File 5606 bytes July 17 2025 21:05:49.
class-updraft-abstract-logger.php File 3510 bytes July 17 2025 21:05:49.
class-updraft-email-logger.php File 4209 bytes July 17 2025 21:05:49.
class-updraft-file-logger.php File 4362 bytes July 17 2025 21:05:49.
class-updraft-log-levels.php File 911 bytes July 17 2025 21:05:49.
class-updraft-logger-interface.php File 2851 bytes July 17 2025 21:05:49.
class-updraft-logger.php File 4960 bytes July 17 2025 21:05:49.
class-updraft-php-logger.php File 2875 bytes July 17 2025 21:05:49.
class-updraft-ring-logger.php File 4148 bytes July 17 2025 21:05:49.
class-updraft-smush-manager-commands.php File 29110 bytes July 17 2025 21:05:49.
class-updraft-smush-manager.php File 58419 bytes July 17 2025 21:05:49.
class-updraft-smush-task.php File 13294 bytes July 17 2025 21:05:49.
class-updraftcentral-wp-optimize-commands.php File 1193 bytes July 17 2025 21:05:49.
class-wp-optimization.php File 13173 bytes July 17 2025 21:05:49.
class-wp-optimize-404-detector-cron.php File 1058 bytes July 17 2025 21:05:49.
class-wp-optimize-404-detector.php File 11259 bytes July 17 2025 21:05:49.
class-wp-optimize-admin.php File 33078 bytes July 17 2025 21:05:49.
class-wp-optimize-browser-cache.php File 9429 bytes July 17 2025 21:05:49.
class-wp-optimize-commands.php File 37345 bytes July 17 2025 21:05:49.
class-wp-optimize-database-information.php File 17133 bytes July 17 2025 21:05:49.
class-wp-optimize-delay-js.php File 11215 bytes July 17 2025 21:05:49.
class-wp-optimize-gzip-compression.php File 11036 bytes July 17 2025 21:05:49.
class-wp-optimize-heartbeat.php File 4044 bytes July 17 2025 21:05:49.
class-wp-optimize-htaccess.php File 9012 bytes July 17 2025 21:05:49.
class-wp-optimize-http-error-codes-trait.php File 9045 bytes July 17 2025 21:05:49.
class-wp-optimize-install-or-update-notice.php File 3344 bytes July 17 2025 21:05:49.
class-wp-optimize-notices.php File 18660 bytes July 17 2025 21:05:49.
class-wp-optimize-options.php File 16430 bytes July 17 2025 21:05:49.
class-wp-optimize-performance.php File 3555 bytes July 17 2025 21:05:49.
class-wp-optimize-preloader.php File 18543 bytes July 17 2025 21:05:49.
class-wp-optimize-server-information.php File 4941 bytes July 17 2025 21:05:49.
class-wp-optimize-system-status-report.php File 11189 bytes July 17 2025 21:05:49.
class-wp-optimize-table-management.php File 3762 bytes July 17 2025 21:05:49.
class-wp-optimize-transients-cache.php File 3434 bytes July 17 2025 21:05:49.
class-wp-optimize-updates.php File 11273 bytes July 17 2025 21:05:49.
class-wp-optimize-utils.php File 7010 bytes July 17 2025 21:05:49.
class-wp-optimizer.php File 20933 bytes July 17 2025 21:05:49.
class-wpo-activation.php File 2748 bytes July 17 2025 21:05:49.
class-wpo-ajax.php File 12418 bytes July 17 2025 21:05:49.
class-wpo-deactivation.php File 533 bytes July 17 2025 21:05:49.
class-wpo-image-utils.php File 1738 bytes July 17 2025 21:05:49.
class-wpo-page-optimizer.php File 1628 bytes July 17 2025 21:05:49.
class-wpo-uninstall.php File 2654 bytes July 17 2025 21:05:49.
updraftcentral.php File 1704 bytes July 17 2025 21:05:49.

Reading File: /home/transcarter//www/wp-content/plugins/wp-optimize//includes/class-wpo-activation.php

<?php
if (!defined('ABSPATH')) die('Access denied.');

if (!class_exists('WPO_Activation')) :

class WPO_Activation {

	/**
	 * Actions to be performed upon plugin activation
	 */
	public static function actions() {
		if (!WP_Optimize()->is_minimum_requirement_met()) {
			WP_Optimize()->add_notice_minimum_requirements_not_met();
			WP_Optimize()->deactivate_plugin();
			WP_Optimize()->die_minimum_requirement_not_met();
		}

		if (is_multisite() && !is_network_admin()) {
			self::deactivate_and_die();
		}

		if (!self::is_reactivated()) {
			self::set_as_newly_activated();
		}

		WP_Optimize()->get_options()->set_default_options();
		WP_Optimize()->get_minify()->plugin_activate();
		WP_Optimize()->get_gzip_compression()->restore();
		WP_Optimize()->get_browser_cache()->restore();
		WP_Optimize()->get_table_management()->create_plugin_tables();
		WP_Optimize()->get_webp_instance()->plugin_activate();

		self::init_batch_processing();

		if (self::is_premium()) {
			self::init_premium();
		}
	}

	/**
	 * When non network admin tries to activate plugin, deactivate it and die with a message
	 */
	private static function deactivate_and_die() {
		deactivate_plugins(plugin_basename(WPO_PLUGIN_MAIN_PATH . 'wp-optimize.php'));
		wp_die(esc_html__('Only Network Administrator can activate the WP-Optimize plugin.', 'wp-optimize') .
			' <a href="' . esc_url(admin_url('plugins.php')) . '">' . esc_html__('go back', 'wp-optimize') . '</a>');
	}

	/**
	 * Decides whether the plugin is newly installed and activated or already installed and reactivated
	 *
	 * @return mixed
	 */
	private static function is_reactivated() {
		return WP_Optimize()->get_options()->get_option('last-optimized', false);
	}

	/**
	 * Set plugin option `newly-activated` as `true`
	 */
	private static function set_as_newly_activated() {
		WP_Optimize()->get_options()->update_option('newly-activated', true);
	}

	/**
	 * Make use of Task Manager library
	 */
	private static function init_batch_processing() {
		if (!class_exists('Updraft_Tasks_Activation')) {
			require_once(WPO_PLUGIN_MAIN_PATH . 'vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-tasks-activation.php');
		}
		Updraft_Tasks_Activation::init(WPO_PLUGIN_SLUG);
		Updraft_Tasks_Activation::reinstall_if_needed();
	}

	/**
	 * Decides whether activate plugin is premium version or not
	 *
	 * @return bool
	 */
	private static function is_premium() {
		return file_exists(WPO_PLUGIN_MAIN_PATH . 'premium.php');
	}

	/**
	 * Run premium plugin activation actions
	 */
	private static function init_premium() {
		if (!class_exists('WP_Optimize_Premium')) {
			include_once(WPO_PLUGIN_MAIN_PATH . 'premium.php');
		}
		WP_Optimize_Premium()->plugin_activation_actions();
	}
}
endif;

SILENT KILLER Tool