Skip to content

Commit

Permalink
Merge pull request #461 from Codeinwp/chore/remove-promo
Browse files Browse the repository at this point in the history
Remove Hyve Promo
  • Loading branch information
HardeepAsrani authored Dec 4, 2024
2 parents 56e18b8 + 1475b0b commit 3d0a62f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
17 changes: 0 additions & 17 deletions assets/js/scripts-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,6 @@ jQuery( function( $ ) {
*/
function handlePlugins() {
const optimoleCheckbox = $( '#wizard-optimole-checkbox' );
const hyveCheckbox = $( '#wizard-hyve-checkbox' );

let promiseChain = Promise.resolve();

if ( optimoleCheckbox.length && optimoleCheckbox.is( ':checked' ) ) {
Expand All @@ -596,19 +594,6 @@ jQuery( function( $ ) {
});
}

if ( hyveCheckbox.length && hyveCheckbox.is( ':checked' ) ) {
promiseChain = promiseChain
.then(() => {
if ( ! wpmmVars.isHyveInstalled ) {
return installPlugin( 'hyve-lite' ).then( () => activatePlugin( 'hyve-lite' ) );
}

if ( ! wpmmVars.isHyveActive ) {
return activatePlugin( 'hyve-lite' );
}
});
}

return promiseChain.catch( ( error ) => {
console.error( 'Error in plugin installation or activation:', error );
});
Expand Down Expand Up @@ -676,8 +661,6 @@ jQuery( function( $ ) {
return $.get( wpmmVars.otterActivationLink );
case 'optimole-wp':
return $.get( wpmmVars.optimoleActivationLink );
case 'hyve-lite':
return $.get( wpmmVars.hyveActivationLink );
default:
break;
}
Expand Down
12 changes: 0 additions & 12 deletions includes/classes/wp-maintenance-mode-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ public function enqueue_admin_scripts() {
'isOtterActive' => is_plugin_active( 'otter-blocks/otter-blocks.php' ),
'isOptimoleInstalled' => file_exists( ABSPATH . 'wp-content/plugins/optimole-wp/optimole-wp.php' ),
'isOptimoleActive' => is_plugin_active( 'optimole-wp/optimole-wp.php' ),
'isHyveInstalled' => file_exists( ABSPATH . 'wp-content/plugins/hyve-lite/hyve-lite.php' ),
'isHyveActive' => is_plugin_active( 'hyve-lite/hyve-lite.php' ),
'errorString' => __( 'Something went wrong, please try again.', 'wp-maintenance-mode' ),
'loadingString' => __( 'Doing some magic...', 'wp-maintenance-mode' ),
'importingText' => __( 'Importing', 'wp-maintenance-mode' ),
Expand Down Expand Up @@ -189,16 +187,6 @@ public function enqueue_admin_scripts() {
),
esc_url( network_admin_url( 'plugins.php' ) )
),
'hyveActivationLink' => add_query_arg(
array(
'action' => 'activate',
'plugin' => rawurlencode( 'hyve-lite/hyve-lite.php' ),
'plugin_status' => 'all',
'paged' => '1',
'_wpnonce' => wp_create_nonce( 'activate-plugin_hyve-lite/hyve-lite.php' ),
),
esc_url( network_admin_url( 'plugins.php' ) )
),
'modalTexts' => array(
'title' => __( 'The template has been imported!', 'wp-maintenance-mode' ),
'description' => __( 'The template has been imported to a new draft page. You can take a look and enable it from plugin settings.', 'wp-maintenance-mode' ),
Expand Down
27 changes: 0 additions & 27 deletions views/wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
),
);

$show_hyve_promo = version_compare( PHP_VERSION, '8.1', '>=' ) && ! is_plugin_active( 'hyve-lite/hyve-lite.php' ) && ! defined( 'HYVE_LITE_VERSION' );

?>
<div id="wpmm-wizard-wrapper">
<div class="slider-wrap">
Expand Down Expand Up @@ -88,31 +86,6 @@
</div>
<?php } ?>

<?php if ( $show_hyve_promo ) { ?>
<div class="optimole-upsell">
<div class="optimole-upsell-container">
<span class="components-checkbox-control__input-container">
<input id="wizard-hyve-checkbox" type="checkbox" class="components-checkbox-control__input" checked>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="presentation" class="components-checkbox-control__checked" aria-hidden="true" focusable="false"><path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"></path></svg>
</span>
<label for="wizard-hyve-checkbox">
<?php esc_html_e( 'Interactive Chatbot', 'wp-maintenance-mode' ); ?>
</label>
</div>
<p class="description">
<?php
printf(
wp_kses(
/* translators: Hyve Lite url */
__( '<a href="%1$s" target="_blank">Hyve%2$s</a> is an AI chatbot plugin for WordPress, ideal for sites in maintenance mode. It enhances user experience by turning your content into interactive conversations, helping visitors access information while your site is under development.', 'wp-maintenance-mode' ),
wpmm_translated_string_allowed_html()
),
esc_url( 'https://wordpress.org/plugins/hyve-lite/' ),
$this->get_external_link_icon()
);
?>
</div>
<?php } ?>
<div id="wizard-buttons" class="import-button">
<input type="button" class="button button-big button-primary disabled button-import" value="<?php esc_html_e( 'Continue', 'wp-maintenance-mode' ); ?>"/>
<input type="button" class="button button-big button-secondary button-skip" value="<?php esc_html_e( 'I don’t want to use a template', 'wp-maintenance-mode' ); ?>"/>
Expand Down

0 comments on commit 3d0a62f

Please sign in to comment.