| 1 |
<?php |
| 2 |
/** |
| 3 |
* Deactivation popup admin |
| 4 |
* |
| 5 |
* Link to Booking Calendar contact form page. |
| 6 |
* |
| 7 |
* @package Booking Calendar/Admin |
| 8 |
* @since 1.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; // Exit if accessed directly. |
| 13 |
} |
| 14 |
|
| 15 |
global $status, $page, $s; |
| 16 |
|
| 17 |
if ( is_plugin_active( 'booking-calendar-com/booking-calendar-com.php' ) ) { |
| 18 |
$wpbc_deactivate_url = wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . WPBC_PRO_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PRO_PLUGIN_FILENAME . '&plugin_status=' . $status . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . WPBC_PRO_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PRO_PLUGIN_FILENAME ); |
| 19 |
} else { |
| 20 |
$wpbc_deactivate_url = wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . WPBC_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PLUGIN_FILENAME . '&plugin_status=' . $status . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . WPBC_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PLUGIN_FILENAME ); |
| 21 |
} |
| 22 |
|
| 23 |
?> |
| 24 |
<div id="wpbc_deactivate-feedback-popup-wrapper"> |
| 25 |
<div class="wpbc_deactivate-feedback-popup-inner"> |
| 26 |
<div class="wpbc_deactivate-feedback-popup-header"> |
| 27 |
<div class="wpbc_deactivate-feedback-popup-header__logo-wrap"> |
| 28 |
<div class="wpbc_deactivate-feedback-popup-header__logo-icon"> |
| 29 |
<?php |
| 30 |
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 31 |
echo wpbc_get_svg_logo_for_html( |
| 32 |
array( |
| 33 |
'svg_color' => '#444', |
| 34 |
'svg_color_alt' => '#bbb', |
| 35 |
'opacity' => '0.35', |
| 36 |
'style_default' => 'background-repeat: no-repeat; background-position: center; display: inline-block; vertical-align: middle;', |
| 37 |
'style_adjust' => 'background-size: 30px auto; width: 30px; height: 30px; margin-top: 0px;', // This parameters, the adjust size of the logo and position. |
| 38 |
'css_class' => '', |
| 39 |
) |
| 40 |
); |
| 41 |
?> |
| 42 |
</div> |
| 43 |
<span class="wpbc_deactivate-feedback-popup-header-title"><?php echo esc_html__( 'Help Us Improve!', 'booking' ); ?></span> |
| 44 |
</div> |
| 45 |
<a class="close-deactivate-feedback-popup"><span class="dashicons dashicons-no-alt"></span></a> |
| 46 |
</div> |
| 47 |
<form class="wpbc_deactivate-feedback-form" method="POST"> |
| 48 |
<?php |
| 49 |
wp_nonce_field( '_wpbc_deactivate_feedback_nonce' ); |
| 50 |
?> |
| 51 |
<input type="hidden" name="action" value="wpbc_deactivate_feedback"/> |
| 52 |
|
| 53 |
<div class="wpbc_deactivate-feedback-popup-form-caption"> |
| 54 |
<?php |
| 55 |
echo esc_html__( 'We\'re sorry to see you leave. Could you tell us why?', 'booking' ); |
| 56 |
?> |
| 57 |
</div> |
| 58 |
<div class="wpbc_deactivate-feedback-popup-form-body"> |
| 59 |
<div class="wpbc_deactivate-feedback-popup-form-questions"> |
| 60 |
<?php foreach ( $wpbc_deactivate_reasons as $wpbc_reason_slug => $wpbc_reason ) : ?> |
| 61 |
<div class="wpbc_deactivate-feedback-popup-input-wrapper"> |
| 62 |
<input id="wpbc_deactivate-feedback-<?php echo esc_attr( $wpbc_reason_slug ); ?>" |
| 63 |
class="wpbc_deactivate-feedback-input" type="checkbox" name="reason_slug" |
| 64 |
value="<?php echo esc_attr( $wpbc_reason_slug ); ?>"/> |
| 65 |
<label for="wpbc_deactivate-feedback-<?php echo esc_attr( $wpbc_reason_slug ); ?>" |
| 66 |
class="wpbc_deactivate-feedback-label"><?php echo wp_kses_post( $wpbc_reason['title'] ); ?></label> |
| 67 |
</div> |
| 68 |
<?php endforeach; ?> |
| 69 |
</div> |
| 70 |
<span class="consent">* <?php esc_html_e( 'By submitting this form, you will also be sending us your email address & website URL.', 'booking' ); ?></span> |
| 71 |
</div> |
| 72 |
<div class="wpbc_deactivate-feedback-popup-form-footer"> |
| 73 |
<a href="<?php echo esc_url( $wpbc_deactivate_url ); ?>" class="skip"><?php esc_html_e( 'Skip & Deactivate', 'booking' ); ?></a> |
| 74 |
<div class="wpbc_deactivate-feedback-popup-form-more-details"> |
| 75 |
<label for="wpbc_deactivate-feedback-more-details" |
| 76 |
class="wpbc_deactivate-feedback-label"><?php echo wp_kses_post( __( 'Could you share more details? We\'d love to fix them!', 'booking' ) ); ?></label> |
| 77 |
<textarea name="wpbc_deactivate-feedback-more-details" placeholder="<?php echo esc_attr( __( 'Please share your feedback', 'booking' ) ); ?>" |
| 78 |
class="feedback-textarea" rows="4"></textarea> |
| 79 |
</div> |
| 80 |
<button class="submit" type="submit"><?php esc_html_e( 'Submit & Deactivate', 'booking' ); ?></button> |
| 81 |
</div> |
| 82 |
</form> |
| 83 |
</div> |
| 84 |
</div> |
| 85 |
|