'DELETE', 'timeout' => 5, 'blocking' => false, 'headers' => array( 'Authorization' => 'Bearer ' . $aiprofile_inside_site['secret'] ), ) ); } } // The "AiProfile" link in the footer menu or navigation goes with the plugin // (only our own item, found by its class). The plugin's own footer line goes // by itself. $aiprofile_inside_settings = get_option( 'aiprofile_inside_settings', array() ); if ( is_array( $aiprofile_inside_settings ) && ! empty( $aiprofile_inside_settings['footer'] ) && is_array( $aiprofile_inside_settings['footer'] ) ) { require_once __DIR__ . '/includes/footer.php'; aiprofile_inside_remove_footer_link( $aiprofile_inside_settings['footer'] ); } $aiprofile_inside_keys = get_option( 'aiprofile_inside_cache_keys', array() ); if ( is_array( $aiprofile_inside_keys ) ) { foreach ( $aiprofile_inside_keys as $aiprofile_inside_key ) { delete_transient( (string) $aiprofile_inside_key ); delete_transient( (string) $aiprofile_inside_key . '_good' ); } } delete_option( 'aiprofile_inside_cache_keys' ); delete_option( 'aiprofile_inside_last_fetch' ); delete_option( 'aiprofile_inside_settings' ); delete_option( 'aiprofile_inside_site' ); delete_transient( 'aiprofile_inside_seen_pings' ); // The twice-daily check for new answers (since 1.3.2). wp_clear_scheduled_hook( 'aiprofile_inside_refresh' ); // The page with the answers stays: it is the owner's content now. // Leftovers in the options table (keys dropped from the bounded list above, // and the question form's counters). global $wpdb; $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_aiprofile_inside_' ) . '%', $wpdb->esc_like( '_transient_timeout_aiprofile_inside_' ) . '%' ) );