1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace BulkWP\BulkDelete\Core\Users\Modules; |
4
|
|
|
|
5
|
|
|
defined( 'ABSPATH' ) || exit; // Exit if accessed directly. |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Delete Users by User Meta in Multisite. |
9
|
|
|
* |
10
|
|
|
* @since 6.1.0 |
11
|
|
|
*/ |
12
|
|
|
class DeleteUsersByUserMetaInMultisiteModule extends DeleteUsersByUserMetaModule { |
13
|
|
|
/** |
14
|
|
|
* Render delete users meta box. |
15
|
|
|
* |
16
|
|
|
* @since 6.1.0 |
17
|
|
|
*/ |
18
|
|
|
public function render() { |
19
|
|
|
?> |
20
|
|
|
<!-- Users Start--> |
21
|
|
|
<h4><?php _e( 'Select the user meta from which you want to delete users', 'bulk-delete' ); ?></h4> |
22
|
|
|
<fieldset class="options"> |
23
|
|
|
<table class="optiontable"> |
24
|
|
|
<select name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_key" class="enhanced-dropdown"> |
25
|
|
|
<?php |
26
|
|
|
$meta_keys = $this->get_unique_user_meta_keys(); |
27
|
|
|
foreach ( $meta_keys as $meta_key ) { |
28
|
|
|
printf( '<option value="%s">%s</option>', esc_attr( $meta_key ), esc_html( $meta_key ) ); |
29
|
|
|
} |
30
|
|
|
?> |
31
|
|
|
</select> |
32
|
|
|
|
33
|
|
|
<select name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_compare"> |
34
|
|
|
<option value="=">Equals to</option> |
35
|
|
|
<option value="!=">Not Equals to</option> |
36
|
|
|
<option value=">">Greater than</option> |
37
|
|
|
<option value=">=">Greater than or equals to</option> |
38
|
|
|
<option value="<">Less than</option> |
39
|
|
|
<option value="<=">Less than or equals to</option> |
40
|
|
|
<option value="LIKE">Contains</option> |
41
|
|
|
<option value="NOT LIKE">Not Contains</option> |
42
|
|
|
<option value="STARTS WITH">Starts with</option> |
43
|
|
|
<option value="ENDS WITH">Ends with</option> |
44
|
|
|
</select> |
45
|
|
|
<input type="text" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_value" placeholder="<?php _e( 'Meta Value', 'bulk-delete' ); ?>"> |
46
|
|
|
</table> |
47
|
|
|
|
48
|
|
|
<p> |
49
|
|
|
<?php _e( 'If you want to check for null values, then leave the value column blank', 'bulk-delete' ); ?> |
50
|
|
|
</p> |
51
|
|
|
<table class="optiontable"> |
52
|
|
|
<?php |
53
|
|
|
$this->render_filtering_table_header(); |
54
|
|
|
$this->render_user_login_restrict_settings(); |
55
|
|
|
$this->render_user_with_no_posts_settings(); |
56
|
|
|
$this->render_limit_settings(); |
57
|
|
|
$this->render_cron_settings(); |
58
|
|
|
?> |
59
|
|
|
</table> |
60
|
|
|
</fieldset> |
61
|
|
|
<!-- Users end--> |
62
|
|
|
<?php |
63
|
|
|
$this->render_submit_button(); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|