| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/baberankings.com/wp-content/plugins/webp-uploads/ |
Upload File : |
<?php
/**
* Plugin uninstaller logic.
*
* @package webp-uploads
* @since 1.1.0
*/
declare( strict_types = 1 );
// 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 ); // @phpstan-ignore argument.type (get_sites( 'fields' => 'ids' ) returns int[], but php-stubs/wordpress-stubs uses a sealed array shape in its conditional return type so the narrowing is lost when extra args are passed. TODO: Fix upstream in php-stubs/wordpress-stubs and remove.)
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' );
}