Telemetry::inject_modal_link()
Outputs the hook that renders the Telemetry action on all TEC admin pages.
Source
File: src/Events/Telemetry/Telemetry.php
public function inject_modal_link() {
if ( ! static::is_tec_admin_page() ) {
return;
}
// Don't double-dip on the action.
if ( did_action( 'tec_telemetry_modal' ) ) {
return;
}
// 'the-events-calendar'
$telemetry_slug = substr( basename( TRIBE_EVENTS_FILE ), 0, -4 );
$show = tribe( Common_Telemetry::class )->calculate_modal_status();
if ( ! $show ) {
return;
}
/**
* Fires to trigger the modal content on admin pages.
*
*
* @since 6.1.0
*/
do_action( 'tec_telemetry_modal', $telemetry_slug );
}
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |