Tribe__Main::get_parent_plugin_file_path()
Get the common library’s parent plugin file path.
Return
(string) The path to the parent plugin file.
Source
File: src/Tribe/Main.php
public function get_parent_plugin_file_path(): string {
/**
* Allows plugins to hook in and declare themselves the parent of common.
* Used by Telemetry to determine which plugin to associate with.
*
* @since 5.1.0
*
* @var string $parent_plugin_file The current path to the parent plugin file.
*
*/
$paths = apply_filters( 'tec_common_parent_plugin_file', [] );
foreach( $paths as $path ) {
$path = wp_normalize_path( $path );
$test_path = str_ireplace( '/common', '', $this->parent_plugin_dir );
if ( stripos( $path, $test_path ) ) {
return $path;
}
}
return '';
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |