Skip to content

Commit

Permalink
Update class-deactivate-duplicate-plugin.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-o committed Apr 23, 2024
1 parent 526685e commit 9317e47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/class-deactivate-duplicate-plugin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Checks if another version of Ghostkit/Ghostkit Pro is active and deactivates it.
* Checks if another version of Ghost Kit/Ghost Kit Pro is active and deactivates it.
*
* @package ghostkit/deactivate-duplicate-plugin
*/
Expand All @@ -22,7 +22,7 @@ public function __construct() {
}

/**
* Checks if another version of Ghostkit/Ghostkit Pro is active and deactivates it.
* Checks if another version of Ghost Kit/Ghost Kit Pro is active and deactivates it.
* Hooked on `activated_plugin` so other plugin is deactivated when current plugin is activated.
*
* @param string $plugin The plugin being activated.
Expand Down Expand Up @@ -58,17 +58,17 @@ public function deactivate_other_instances( $plugin ) {
}

/**
* Displays a notice when either Ghostkit or Ghostkit Pro is automatically deactivated.
* Displays a notice when either Ghost Kit or Ghost Kit Pro is automatically deactivated.
*/
public function plugin_deactivated_notice() {
$deactivated_notice_id = (int) get_transient( 'gkt_deactivated_notice_id' );
if ( ! in_array( $deactivated_notice_id, array( 1, 2 ), true ) ) {
return;
}

$message = __( "Ghostkit and Ghostkit Pro should not be active at the same time. We've automatically deactivated Ghostkit.", 'ghostkit' );
$message = __( "Ghost Kit and Ghost Kit Pro should not be active at the same time. We've automatically deactivated Ghost Kit.", 'ghostkit' );
if ( 2 === $deactivated_notice_id ) {
$message = __( "Ghostkit and Ghostkit Pro should not be active at the same time. We've automatically deactivated Ghostkit Pro.", 'ghostkit' );
$message = __( "Ghost Kit and Ghost Kit Pro should not be active at the same time. We've automatically deactivated Ghost Kit Pro.", 'ghostkit' );
}

?>
Expand Down

0 comments on commit 9317e47

Please sign in to comment.