WP_AI_Client_Ability_Function_Resolver::ability_name_to_function_name( string $ability_name ): string

Converts an ability name to a function name.

Description

Transforms “tec/create_event” to “wpabteccreate_event”.

Parameters

$ability_namestringrequired
The ability name to convert.

Return

string The function name.

Source

public static function ability_name_to_function_name( string $ability_name ): string {
	return self::ABILITY_PREFIX . str_replace( '/', '__', $ability_name );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

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