<commit_before><?php
/**
 * Uninstall routines. This file is called automatically when the plugin
 * is deleted per user interface.
 *
 * See http://codex.wordpress.org/Function_Reference/register_uninstall_hook
 */

// Prevent direct access.
defined( 'WP_UNINSTALL_PLUGIN' ) || die();

// We don't do anything on single sites anyway.
if ( ! is_multisite() )
	return;


// check if the "pro"-version is available and activated
if ( function_exists( 'mlp_pro_init' ) ) {
	return;
}

// check if the "free"-version is available and activated
if ( function_exists( 'mlp_init' ) ) {
	return;
}


// getting all available plugins
$plugins = get_plugins();
$check   = '';

if ( WP_UNINSTALL_PLUGIN === 'multilingual-press/multilingual-press.php' ) {
	// checking if the pro is available (not active) when the free is uninstalled
	if ( array_key_exists( 'multilingual-press-pro/multilingual-press.php', $plugins ) )
		return;
}
else if ( WP_UNINSTALL_PLUGIN === 'multilingual-press-pro/multilingual-press.php' ) {
	// checking if the free is available (not active) when the pro is uninstalled
	if ( array_key_exists( 'multilingual-press/multilingual-press.php', $plugins ) )
		return;
}


// ------ Tables ------
/**
 * @var wpdb
 */
global $wpdb;

foreach ( array ( 'mlp_languages', 'multilingual_linked', 'mlp_site_relations' ) as $table )
	$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->base_prefix . $table );


// ------ Site options ------

delete_site_option( 'inpsyde_multilingual' );
delete_site_option( 'inpsyde_multilingual_cpt' );
delete_site_option( 'inpsyde_multilingual_quicklink_options' );
delete_site_option( 'mlp_version' );<commit_msg>Delete site option 'state_modules' on uninstall<commit_after><?php
/**
 * Uninstall routines. This file is called automatically when the plugin
 * is deleted per user interface.
 *
 * See http://codex.wordpress.org/Function_Reference/register_uninstall_hook
 */

// Prevent direct access.
defined( 'WP_UNINSTALL_PLUGIN' ) || die();

// We don't do anything on single sites anyway.
if ( ! is_multisite() )
	return;


// check if the "pro"-version is available and activated
if ( function_exists( 'mlp_pro_init' ) ) {
	return;
}

// check if the "free"-version is available and activated
if ( function_exists( 'mlp_init' ) ) {
	return;
}


// getting all available plugins
$plugins = get_plugins();
$check   = '';

if ( WP_UNINSTALL_PLUGIN === 'multilingual-press/multilingual-press.php' ) {
	// checking if the pro is available (not active) when the free is uninstalled
	if ( array_key_exists( 'multilingual-press-pro/multilingual-press.php', $plugins ) )
		return;
}
else if ( WP_UNINSTALL_PLUGIN === 'multilingual-press-pro/multilingual-press.php' ) {
	// checking if the free is available (not active) when the pro is uninstalled
	if ( array_key_exists( 'multilingual-press/multilingual-press.php', $plugins ) )
		return;
}


// ------ Tables ------
/**
 * @var wpdb
 */
global $wpdb;

foreach ( array ( 'mlp_languages', 'multilingual_linked', 'mlp_site_relations' ) as $table )
	$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->base_prefix . $table );


// ------ Site options ------

delete_site_option( 'inpsyde_multilingual' );
delete_site_option( 'inpsyde_multilingual_cpt' );
delete_site_option( 'inpsyde_multilingual_quicklink_options' );
delete_site_option( 'state_modules' );
delete_site_option( 'mlp_version' );
{'fraction_non_alphanumeric': 0.1392104482042149, 'fraction_numerical': 0.0, 'mean_word_length': 4.192604006163328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2801760', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1083, 'n_words': 283}