HEX
Server: Apache
System: Linux s18.infinitysrv.com 3.10.0-962.3.2.lve1.5.87.el7.x86_64 #1 SMP Tue Jan 28 09:38:56 UTC 2025 x86_64
User: clavospa (1286)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/clavospa/public_html/wp/wp-content/plugins/webp-uploads/uninstall.php
<?php
/**
 * Plugin uninstaller logic.
 *
 * @package webp-uploads
 * @since 1.1.0
 */

// If uninstall.php is not called by WordPress, bail.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

// For a multisite, delete the option for all sites (however limited to 100 sites to avoid memory limit or timeout problems in large scale networks).
if ( is_multisite() ) {
	$webp_uploads_site_ids = get_sites(
		array(
			'fields'                 => 'ids',
			'number'                 => 100,
			'update_site_cache'      => false,
			'update_site_meta_cache' => false,
		)
	);

	foreach ( $webp_uploads_site_ids as $webp_uploads_site_id ) {
		switch_to_blog( $webp_uploads_site_id );
		webp_uploads_delete_plugin_option();
		restore_current_blog();
	}
}

webp_uploads_delete_plugin_option();

/**
 * Delete the current site's option.
 *
 * @since 1.1.0
 */
function webp_uploads_delete_plugin_option(): void {
	delete_option( 'perflab_generate_webp_and_jpeg' );
	delete_option( 'perflab_generate_all_fallback_sizes' );
}