query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_halawa_chatgpt_pair_' ) . '%', $wpdb->esc_like( '_transient_timeout_halawa_chatgpt_pair_' ) . '%' ) ); } /** * Runs the cleanup on every site of the install (network-aware). * * @since 0.1.2 * * @return void */ function halawa_chatgpt_uninstall(): void { if ( is_multisite() ) { $site_ids = get_sites( array( 'fields' => 'ids', 'number' => 0, ) ); foreach ( $site_ids as $site_id ) { switch_to_blog( (int) $site_id ); halawa_chatgpt_uninstall_cleanup_site(); restore_current_blog(); } return; } halawa_chatgpt_uninstall_cleanup_site(); } halawa_chatgpt_uninstall();