Passed
Pull Request — dev/6.2.0 (#709)
by
unknown
137:18 queued 67:47
created

DeleteUsersInMultisitePage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_top_level_menu_slug() 0 2 1
A register() 0 12 1
A initialize() 0 6 1
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Users;
4
5
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
6
7
/**
8
 * Bulk Delete Users in Multisite Page.
9
 *
10
 * Shows the list of modules that allows you to delete users in multisite.
11
 *
12
 * @since 6.1.0
13
 */
14
class DeleteUsersInMultisitePage extends DeleteUsersPage {
15
	// phpcs:ignore Squiz.Commenting.FunctionComment.Missing
16
	protected function initialize() {
17
		parent::initialize();
18
19
		$this->page_slug = 'bulk-delete-users-in-multisite';
20
21
		$this->show_link_in_plugin_list = false;
22
	}
23
24
	// phpcs:ignore Squiz.Commenting.FunctionComment.Missing
25
	public function register() {
26
		add_menu_page(
27
			__( 'Bulk WP', 'bulk-delete' ),
28
			__( 'Bulk WP', 'bulk-delete' ),
29
			$this->capability,
30
			$this->page_slug,
31
			array( $this, 'render_page' ),
32
			'dashicons-trash',
33
			$this->get_bulkwp_menu_position()
34
		);
35
36
		parent::register();
37
	}
38
39
	protected function get_top_level_menu_slug() {
40
		return $this->page_slug;
41
	}
42
}
43