WP_AI_Client_Ability_Function_Resolver::function_name_to_ability_name( string $function_name ): string

Converts a function name to an ability name.

Description

Transforms “wpabteccreate_event” to “tec/create_event”.

Parameters

$function_namestringrequired
The function name to convert.

Return

string The ability name.

Source

public static function function_name_to_ability_name( string $function_name ): string {
	$without_prefix = substr( $function_name, strlen( self::ABILITY_PREFIX ) );

	return str_replace( '__', '/', $without_prefix );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

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