-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, the add_plugin() method sets the current plugin slug and there's no way to override it. We should add a parameter to the method so plugins can override the wp_slug and manually add additional plugins to the opt-in option (stellarwp_telemetry in the options table).
telemetry/src/Telemetry/Opt_In/Status.php
Lines 139 to 158 in 331b617
| /** | |
| * Adds a plugin slug to the opt-in option array. | |
| * | |
| * @since 1.0.0 | |
| * | |
| * @param string $stellar_slug The unique slug identifier for the plugin. | |
| * @param boolean $status The opt-in status for the plugin. | |
| * | |
| * @return boolean | |
| */ | |
| public function add_plugin( string $stellar_slug, bool $status = false ) { | |
| $option = $this->get_option(); | |
| $option['plugins'][ $stellar_slug ] = [ | |
| 'wp_slug' => Config::get_container()->get( Core::PLUGIN_BASENAME ), | |
| 'optin' => $status, | |
| ]; | |
| return update_option( $this->get_option_name(), $option ); | |
| } |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request