$wp360_uninstall_plugin ) { if ( WP_UNINSTALL_PLUGIN !== $wp360_uninstall_basename && '360-orbit-header-security' === $wp360_uninstall_plugin['TextDomain'] ) { return; } } /** * Raeumt die Daten der aktuellen Website auf (auf Multisite pro Website). */ function wp360_hs_uninstall_site() { global $wpdb; $wpdb->query( "DROP TABLE IF EXISTS `{$wpdb->prefix}wp360_header_security_hosts`" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- eigene Tabelle, Name ist fest. delete_option( 'wp360_hs_license' ); delete_option( 'wp360_hs_settings' ); delete_option( 'wp360_hs_htaccess_backup' ); delete_option( 'wp360_hs_htaccess_last_written' ); delete_option( 'wp360_hs_htaccess_last_test' ); delete_option( 'wp360_hs_htaccess_block_version' ); delete_option( 'wp360_hs_csp_learning' ); wp_clear_scheduled_hook( 'wp360_hs_csp_learning_check' ); delete_transient( 'wp360_hs_scan_state' ); delete_transient( 'wp360_hs_update_check' ); delete_option( 'wp360_hs_prefix_migrated' ); delete_transient( 'wp360_hs_prefix_retry' ); } if ( is_multisite() ) { foreach ( get_sites( array( 'fields' => 'ids' ) ) as $wp360_uninstall_site_id ) { switch_to_blog( (int) $wp360_uninstall_site_id ); wp360_hs_uninstall_site(); restore_current_blog(); } } else { wp360_hs_uninstall_site(); } // Waechter-Datei in mu-plugins (falls der .htaccess-Spiegel sie angelegt hat). $wp360_uninstall_sentinel = trailingslashit( WPMU_PLUGIN_DIR ) . '360-orbit-header-security-sentinel.php'; if ( is_file( $wp360_uninstall_sentinel ) ) { wp_delete_file( $wp360_uninstall_sentinel ); }