Telemetry::get_parent_plugin_slug()
Get the slug of the parent plugin.
Hydrated lazily.
Return
(string)
Source
File: src/Common/Telemetry/Telemetry.php
public static function get_parent_plugin_slug(): string {
if ( empty( self::$parent_plugin ) ) {
$file = \Tribe__Main::instance()->get_parent_plugin_file_path();
self::$parent_plugin = substr(
$file,
( strrpos( $file, '/' ) + 1 ),
( strlen( $file ) - ( strrpos( $file, '/' ) + 5 ) )
);
}
return self::$parent_plugin;
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |