403Webshell
Server IP : 31.214.178.50  /  Your IP : 216.73.217.58
Web Server : Apache
System : Linux hostingsrv42.dondominio.com 6.12.107+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.107-1 (2026-08-29) x86_64
User :  ( 1021069)
PHP Version : 8.5.9
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/univolution.com/public/wp-content/plugins/qode-optimizer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/univolution.com/public/wp-content/plugins/qode-optimizer/uninstall.php
<?php
/**
 * Plugin uninstall procedures
 *
 * @package Qode
 */

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

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	die;
}

require_once __DIR__ . '/helpers/helper.php';

if ( ! function_exists( 'qode_optimizer_get_htaccess_path' ) ) {
	/**
	 * Get .htaccess path
	 *
	 * @return string .htaccess file path
	 */
	function qode_optimizer_get_htaccess_path() {
		$htaccess_folder = qode_optimizer_get_home_path();
		$htaccess_file   = $htaccess_folder . '.htaccess';

		$home     = get_option( 'home' );
		$site_url = get_option( 'siteurl' );

		// Site Url is sub-domain of WP.
		if ( $home !== $site_url ) {
			$url_base       = rtrim( $htaccess_folder, '/' );
			$url_difference = ltrim( str_replace( $home, '', $site_url ), '/' );

			$subdomain_htaccess_folder = trailingslashit( $url_base . '/' . $url_difference );
			$subdomain_htaccess_file   = $subdomain_htaccess_folder . '.htaccess';

			if ( is_file( $subdomain_htaccess_file ) ) {
				return $subdomain_htaccess_file;
			}
		}

		return $htaccess_file;
	}
}

if ( current_user_can( 'delete_plugins' ) ) {
	// Check for .htaccess rules the plugin might have added and, if any found, delete them.
	$added_rules = extract_from_markers(
		qode_optimizer_get_htaccess_path(),
		'QODE OPTIMIZER'
	);

	if ( ! empty( $added_rules ) ) {
		insert_with_markers(
			qode_optimizer_get_htaccess_path(),
			'QODE OPTIMIZER',
			''
		);
	}

	// Delete db tables the plugin added.
	global $wpdb;

	$added_db_tables = array(
		$wpdb->prefix . 'qo_backup',
		$wpdb->prefix . 'qo_modifications',
	);

	foreach ( $added_db_tables as $added_db_table ) {
		/**
		 * Ignoring WordPress.DB.PreparedSQL.NotPrepared checks for the following reasons:
		 * - table name strings cannot be reliably prepared because we need to use %i placeholder, which is supported only in more recent WP versions
		 * - it's a well known issue apparently, an error gets falsely fired (false positive) for interpolated table names
		 */
		$wpdb->query( 'DROP TABLE IF EXISTS ' . $added_db_table ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit