query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'spotfind_items' ) ); foreach ( array( 'spotfind_options', 'spotfind_version', 'spotfind_meta', 'spotfind_db', 'spotfind_lock' ) as $option ) { delete_option( $option ); } foreach ( array( 'spotfind_rebuild', 'spotfind_full', 'spotfind_daily', 'spotfind_rebuild_daily' ) as $cron_hook ) { wp_clear_scheduled_hook( $cron_hook ); } $dir = wp_upload_dir()['basedir'] . '/spotfind'; foreach ( array_merge( (array) glob( "$dir/index-*.json" ), (array) glob( "$dir/cards-*.json" ), (array) glob( "$dir/*.tmp" ), array( "$dir/.htaccess" ) ) as $file ) { // no GLOB_BRACE: missing on musl hosts if ( is_file( $file ) ) { wp_delete_file( $file ); } } @rmdir( $dir ); // phpcs:ignore WordPress.PHP.NoSilencedErrors, WordPress.WP.AlternativeFunctions.file_system_operations_rmdir -- WP_Filesystem needs credentials the uninstaller does not have; the folder is empty here } )();