deactivation-modal.php
2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Deactivation Modal view, displayed when a Plugin is deactivated.
*
* @package WPZincDashboardWidget
* @author WP Zinc
*/
?>
<div id="wpzinc-deactivation-modal-overlay" class="wpzinc-modal-overlay"></div>
<div id="wpzinc-deactivation-modal" class="wpzinc-modal">
<h2 class="title">
<?php echo esc_html( $this->plugin->displayName ); ?>
</h2>
<p class="message">
<?php
echo sprintf(
/* Translators: Plugin Name */
esc_html__( 'Optional: We\'d be super grateful if you could take a moment to let us know why you\'re deactivating %s', $this->plugin->name ), // phpcs:ignore WordPress.WP.I18n
esc_html( $this->plugin->displayName )
);
?>
</p>
<form method="post" action="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>" id="wpzinc-deactivation-modal-form">
<ul>
<?php
if ( is_array( $reasons ) && count( $reasons ) > 0 ) {
foreach ( $reasons as $key => $label ) {
?>
<li>
<label>
<span><input type="radio" name="reason" value="<?php echo esc_attr( $key ); ?>" /></span>
<span><?php echo esc_html( $label ); ?></span>
</label>
</li>
<?php
}
}
?>
</ul>
<div class="additional-information">
<p>
<label for="reason_text">
<?php esc_html_e( 'Optional: Was there a problem, any feedback or something we could do better?', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>
</label>
<input type="text" id="reason_text" name="reason_text" value="" placeholder="<?php esc_attr_e( 'e.g. XYZ Plugin because it has this feature...', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="widefat" />
</p>
<p>
<label for="reason_email"><?php esc_html_e( 'Optional: Email Address', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?></label>
<input type="email" id="reason_email" name="reason_email" value="" class="widefat" />
<small>
<?php
esc_html_e( 'If you\'d like further discuss the problem / feature, enter your email address above and we\'ll be in touch. This will *never* be used for any marketing.', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n
?>
</small>
</p>
</div>
<input type="submit" name="submit" value="<?php esc_attr_e( 'Deactivate', $this->plugin->name ); // phpcs:ignore WordPress.WP.I18n ?>" class="button button-primary" />
</form>
</div>