Passed
Push — 671-feature/add-mutisite-suppo... ( 7c9bd5...e10db6 )
by Sudar
05:24
created

DeleteUsersInMultisitePage::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
c 1
b 0
f 0
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
16
	// phpcs:ignore Squiz.Commenting.FunctionComment.Missing
17
	protected function initialize() {
18
		parent::initialize();
19
20
		$this->page_slug = 'bulk-delete-users-in-multisite';
21
22
		$this->show_link_in_plugin_list = false;
23
	}
24
25
	// phpcs:ignore Squiz.Commenting.FunctionComment.Missing
26
	public function register() {
27
		add_menu_page(
28
			__( 'Bulk WP', 'bulk-delete' ),
29
			__( 'Bulk WP', 'bulk-delete' ),
30
			$this->capability,
31
			$this->page_slug,
32
			array( $this, 'render_page' ),
33
			'dashicons-trash',
34
			$this->get_bulkwp_menu_position()
35
		);
36
37
		parent::register();
38
	}
39
40
	protected function get_top_level_menu_slug() {
41
		return $this->page_slug;
42
	}
43
}
44