Converts an ability name to a function name.
Description
Transforms “tec/create_event” to “wpabteccreate_event”.
Parameters
$ability_namestringrequired- The ability name to convert.
Source
public static function ability_name_to_function_name( string $ability_name ): string {
return self::ABILITY_PREFIX . str_replace( '/', '__', $ability_name );
}
Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.