$33 GRAYBYTE WORDPRESS FILE MANAGER $84

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.ancuong.com/wp-content/plugins/code-snippets-pro/php/

HOME
Current File : /home/bqrcodec/contact.ancuong.com/wp-content/plugins/code-snippets-pro/php//uninstall.php
<?php
/**
 * Functions for cleaning data when the plugin is uninstalled.
 *
 * @package Code_Snippets
 */

namespace Code_Snippets\Uninstall;

/**
 * Determine whether the option for allowing a complete uninstallation is enabled.
 *
 * @return boolean
 */
function complete_uninstall_enabled() {
	$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" ); // cache ok, db call ok.

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

/**
 * 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" ); // cache ok, db call ok.

	// 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();
		}
	}
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
admin-menus
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
export
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
front-end
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
settings
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
views
--
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0755
class-active-snippets.php
6.827 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-admin.php
9.028 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-command.php
15.078 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-contextual-help.php
6.101 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-db.php
7.98 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-licensing.php
2.886 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-list-table.php
37.864 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-plugin.php
8.257 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-rest-api.php
1.416 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-snippet.php
16.934 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-upgrade.php
6.263 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
class-validator.php
6.809 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
editor.php
3.053 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
load.php
1.299 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
snippet-ops.php
16.085 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
strings.php
2.165 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644
uninstall.php
1.921 KB
26 Jan 2024 11.55 AM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF