WP_AI_Client_Ability_Function_Resolver::is_ability_call( WordPressAiClientToolsDTOFunctionCall $call ): bool

In this article

Checks if a function call is an ability call.

Parameters

$callWordPressAiClientToolsDTOFunctionCallrequired
The function call to check.

Return

bool True if the function call is an ability call, false otherwise.

Source

public function is_ability_call( FunctionCall $call ): bool {
	$name = $call->getName();
	if ( null === $name ) {
		return false;
	}

	return str_starts_with( $name, self::ABILITY_PREFIX );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.