| 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 |
$wpbc_plugin_basename = is_plugin_active( 'booking-calendar-com/booking-calendar-com.php' ) |
| 18 |
? 'booking-calendar-com/booking-calendar-com.php' |
| 19 |
: WPBC_PLUGIN_DIRNAME . '/' . WPBC_PLUGIN_FILENAME; |
| 20 |
|
| 21 |
$wpbc_deactivate_url = wp_nonce_url( |
| 22 |
add_query_arg( |
| 23 |
array( |
| 24 |
'action' => 'deactivate', |
| 25 |
'plugin' => $wpbc_plugin_basename, |
| 26 |
'plugin_status' => (string) $status, |
| 27 |
'paged' => (string) $page, |
| 28 |
's' => (string) $s, |
| 29 |
), |
| 30 |
self_admin_url( 'plugins.php' ) |
| 31 |
), |
| 32 |
'deactivate-plugin_' . $wpbc_plugin_basename |
| 33 |
); |
| 34 |
|
| 35 |
?> |
| 36 |
<div id="wpbc_deactivate-feedback-popup-wrapper"> |
| 37 |
<div class="wpbc_deactivate-feedback-popup-inner"> |
| 38 |
<div class="wpbc_deactivate-feedback-popup-header"> |
| 39 |
<div class="wpbc_deactivate-feedback-popup-header__logo-wrap"> |
| 40 |
<div class="wpbc_deactivate-feedback-popup-header__logo-icon"> |
| 41 |
<?php |
| 42 |
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 43 |
echo wpbc_get_svg_logo_for_html( |
| 44 |
array( |
| 45 |
'svg_color' => '#444', |
| 46 |
'svg_color_alt' => '#bbb', |
| 47 |
'opacity' => '0.35', |
| 48 |
'style_default' => 'background-repeat: no-repeat; background-position: center; display: inline-block; vertical-align: middle;', |
| 49 |
'style_adjust' => 'background-size: 30px auto; width: 30px; height: 30px; margin-top: 0px;', // This parameters, the adjust size of the logo and position. |
| 50 |
'css_class' => '', |
| 51 |
) |
| 52 |
); |
| 53 |
?> |
| 54 |
</div> |
| 55 |
<span class="wpbc_deactivate-feedback-popup-header-title"><?php echo esc_html__( 'Help Us Improve!', 'booking' ); ?></span> |
| 56 |
</div> |
| 57 |
<a class="close-deactivate-feedback-popup"><span class="dashicons dashicons-no-alt"></span></a> |
| 58 |
</div> |
| 59 |
<form class="wpbc_deactivate-feedback-form" method="POST"> |
| 60 |
<?php |
| 61 |
wp_nonce_field( '_wpbc_deactivate_feedback_nonce' ); |
| 62 |
?> |
| 63 |
<input type="hidden" name="action" value="wpbc_deactivate_feedback"/> |
| 64 |
|
| 65 |
<div class="wpbc_deactivate-feedback-popup-form-caption"> |
| 66 |
<?php |
| 67 |
echo esc_html__( 'We\'re sorry to see you leave. Could you tell us why?', 'booking' ); |
| 68 |
?> |
| 69 |
</div> |
| 70 |
<div class="wpbc_deactivate-feedback-popup-form-body"> |
| 71 |
<div class="wpbc_deactivate-feedback-popup-form-questions"> |
| 72 |
<?php foreach ( $wpbc_deactivate_reasons as $wpbc_reason_slug => $wpbc_reason ) : ?> |
| 73 |
<div class="wpbc_deactivate-feedback-popup-input-wrapper"> |
| 74 |
<input id="wpbc_deactivate-feedback-<?php echo esc_attr( $wpbc_reason_slug ); ?>" |
| 75 |
class="wpbc_deactivate-feedback-input" type="checkbox" name="reason_slug" |
| 76 |
value="<?php echo esc_attr( $wpbc_reason_slug ); ?>"/> |
| 77 |
<label for="wpbc_deactivate-feedback-<?php echo esc_attr( $wpbc_reason_slug ); ?>" |
| 78 |
class="wpbc_deactivate-feedback-label"><?php echo wp_kses_post( $wpbc_reason['title'] ); ?></label> |
| 79 |
</div> |
| 80 |
<?php endforeach; ?> |
| 81 |
</div> |
| 82 |
<span class="consent">* <?php esc_html_e( 'By submitting this form, you will also be sending us your email address & website URL.', 'booking' ); ?></span> |
| 83 |
</div> |
| 84 |
<div class="wpbc_deactivate-feedback-popup-form-footer"> |
| 85 |
<a href="<?php echo esc_url( $wpbc_deactivate_url ); ?>" class="skip"><?php esc_html_e( 'Skip & Deactivate', 'booking' ); ?></a> |
| 86 |
<div class="wpbc_deactivate-feedback-popup-form-more-details"> |
| 87 |
<label for="wpbc_deactivate-feedback-more-details" |
| 88 |
class="wpbc_deactivate-feedback-label"><?php echo wp_kses_post( __( 'Could you share more details? We\'d love to fix them!', 'booking' ) ); ?></label> |
| 89 |
<textarea id="wpbc_deactivate-feedback-more-details" name="wpbc_deactivate-feedback-more-details" placeholder="<?php echo esc_attr( __( 'Please share your feedback', 'booking' ) ); ?>" |
| 90 |
class="feedback-textarea" rows="4" aria-describedby="wpbc_deactivate-feedback-more-details-error" aria-invalid="false"></textarea> |
| 91 |
<span id="wpbc_deactivate-feedback-more-details-error" class="wpbc_deactivate-feedback-more-details-error" aria-live="polite"> |
| 92 |
<?php esc_html_e( 'Please share more details before submitting.', 'booking' ); ?> |
| 93 |
</span> |
| 94 |
</div> |
| 95 |
<button class="submit" type="submit"><?php esc_html_e( 'Submit & Deactivate', 'booking' ); ?></button> |
| 96 |
</div> |
| 97 |
</form> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
|