Telemetry::show_optin_modal( string $slug )
Triggers Telemetry’s opt-in modal with our parameters.
Contents
Parameters
- $slug
-
(string) (Required) The plugin slug for Telemetry.
Return
(void)
Source
File: src/Common/Telemetry/Telemetry.php
public function show_optin_modal( $slug ): void {
/**
* Filter allowing disabling of the optin modal.
* Returning boolean false will disable the modal
*
* @since 5.1.0
*
* @param bool $show Whether to show the modal or not.
*
*/
$show = (bool) apply_filters( 'tec_common_telemetry_show_optin_modal', true, $slug );
if ( ! $show ) {
return;
}
/**
* Telemetry uses this to determine when/where the optin modal should be shown.
* i.e. the modal is shown when we run this.
*
* @since 5.1.0
*
* @param string $plugin_slug The slug of the plugin showing the modal.
*/
do_action( 'stellarwp/telemetry/optin', $slug );
}
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |