SILENT KILLERPanel

Current Path: > home > codekrsu > > shopceylon.store > wp-content > plugins > code-snippets > php


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets/php

NameTypeSizeLast ModifiedActions
admin-menus Directory - -
cloud Directory - -
export Directory - -
front-end Directory - -
rest-api Directory - -
settings Directory - -
views Directory - -
class-active-snippets.php File 1892 bytes February 14 2025 13:16:14.
class-admin.php File 10843 bytes February 14 2025 13:16:14.
class-contextual-help.php File 6388 bytes February 14 2025 13:16:14.
class-data-item.php File 6379 bytes February 14 2025 13:16:14.
class-db.php File 7870 bytes November 27 2024 21:28:50.
class-licensing.php File 314 bytes February 14 2025 13:16:14.
class-list-table.php File 38586 bytes February 14 2025 13:16:14.
class-plugin.php File 10009 bytes February 14 2025 13:16:14.
class-snippet.php File 13381 bytes February 14 2025 13:16:14.
class-upgrade.php File 6712 bytes February 14 2025 13:16:14.
class-validator.php File 7188 bytes November 27 2024 21:28:50.
class-welcome-api.php File 9762 bytes November 27 2024 21:52:46.
deactivation-notice.php File 1991 bytes November 27 2024 21:28:50.
editor.php File 3280 bytes November 06 2023 19:43:04.
load.php File 1464 bytes February 14 2025 13:16:14.
snippet-ops.php File 21480 bytes February 14 2025 13:16:14.
strings.php File 1848 bytes May 19 2023 18:41:32.
uninstall.php File 2129 bytes February 14 2025 13:16:14.

Reading File: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets/php/uninstall.php

<?php
/**
 * Functions for cleaning data when the plugin is uninstalled.
 *
 * @package Code_Snippets
 *
 * phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
 */

namespace Code_Snippets\Uninstall;

/**
 * Determine whether the option for allowing a complete uninstallation is enabled.
 *
 * @return boolean
 */
function complete_uninstall_enabled(): bool {
	$unified = false;

	if ( is_multisite() ) {
		$menu_perms = get_site_option( 'menu_items', array() );
		$unified = empty( $menu_perms['snippets_settings'] );
	}

	$settings = $unified ? get_site_option( 'code_snippets_settings' ) : get_option( 'code_snippets_settings' );

	return isset( $settings['general']['complete_uninstall'] ) && $settings['general']['complete_uninstall'];
}

/**
 * Clean up data created by this plugin for a single site
 *
 * phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
 */
function uninstall_current_site() {
	global $wpdb;

	$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}snippets" );

	delete_option( 'code_snippets_version' );
	delete_option( 'recently_activated_snippets' );
	delete_option( 'code_snippets_settings' );

	delete_option( 'code_snippets_cloud_settings' );
	delete_transient( 'cs_codevault_snippets' );
	delete_transient( 'cs_local_to_cloud_map' );
}

/**
 * Clean up data created by this plugin on multisite.
 *
 * phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
 */
function uninstall_multisite() {
	global $wpdb;

	// Loop through sites.
	$blog_ids = get_sites( [ 'fields' => 'ids' ] );

	foreach ( $blog_ids as $site_id ) {
		switch_to_blog( $site_id );
		uninstall_current_site();
	}

	restore_current_blog();

	// Remove network snippets table.
	$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}ms_snippets" );

	// Remove saved options.
	delete_site_option( 'code_snippets_version' );
	delete_site_option( 'recently_activated_snippets' );
}

/**
 * Uninstall the Code Snippets plugin.
 *
 * @return void
 */
function uninstall_plugin() {
	if ( complete_uninstall_enabled() ) {

		if ( is_multisite() ) {
			uninstall_multisite();
		} else {
			uninstall_current_site();
		}
	}
}

SILENT KILLER Tool