apply_filters( 'wp_ai_client_default_request_timeout', float $default_timeout )
- Since
- 7.0.0
Filters the default request timeout in seconds for AI Client HTTP requests.
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.
Parameters
$default_timeoutfloat- The default timeout in seconds.
Where this hook fires · 1
wp-includes/ai-client/class-wp-ai-client-prompt-builder.php:202WP_AI_Client_Prompt_Builder::__construct()
Source code
* Filters the default request timeout in seconds for AI Client HTTP requests. * * @since 7.0.0 * * @param float $default_timeout The default timeout in seconds. */ $filtered_default_timeout = apply_filters( 'wp_ai_client_default_request_timeout', $default_timeout ); if ( is_numeric( $filtered_default_timeout ) && (float) $filtered_default_timeout >= 0.0 ) { $default_timeout = (float) $filtered_default_timeout; } else { _doing_it_wrong( __METHOD__, sprintf(Changelog
Introduced in 7.0.0. Unchanged from 7.0.4 through 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, 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.