wppaste
WordPress

WP_AI_Client_Discovery_Strategy

Since
7.0.0
Source
wp-includes/ai-client/adapters/class-wp-ai-client-discovery-strategy.php:24
Discovery strategy for WordPress HTTP client.

Description

Registers the WordPress HTTP client adapter with the HTTPlug discovery system so the AI Client SDK can find and use it automatically.

Compatibility

WordPress
since 7.0.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 2 of the 5 tracked releases, added in 7.0.0.

Methods · 1

Source code

class WP_AI_Client_Discovery_Strategy extends AbstractClientDiscoveryStrategy { 	/**	 * Creates an instance of the WordPress HTTP client.	 *	 * @since 7.0.0	 *	 * @param Psr17Factory $psr17_factory The PSR-17 factory for creating HTTP messages.	 * @return ClientInterface The PSR-18 HTTP client.	 */	protected static function createClient( Psr17Factory $psr17_factory ): ClientInterface {		return new WP_AI_Client_HTTP_Client( $psr17_factory, $psr17_factory );	}}

Changelog

Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.

  1. 7.0.4
  2. 7.1.0

Signature, return type and hooks compared across 2 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ai-client/adapters/class-wp-ai-client-discovery-strategy.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.