Completed
Push — 50-feature/delete-blogs-in-mul... ( a42973 )
by
unknown
05:00
created

DeleteSitesInMultisitePage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_top_level_menu_slug() 0 2 1
A initialize() 0 14 1
A add_help_tab() 0 11 1
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Sites;
4
5
use BulkWP\BulkDelete\Core\Base\BaseDeletePage;
6
7
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
9
/**
10
 * Bulk Delete Sites Page.
11
 *
12
 * Shows the list of modules that provides the ability to delete sites.
13
 *
14
 * @since 6.2.0
15
 */
16
class DeleteSitesInMultisitePage extends BaseDeletePage {
17
	/**
18
	 * Initialize and setup variables.
19
	 *
20
	 * @since 6.2.0
21
	 */
22
	protected function initialize() {
23
		$this->page_slug = 'bulk-delete-sites';
24
		$this->item_type = 'sites';
25
26
		$this->label = array(
27
			'page_title' => __( 'Bulk Delete Sites', 'bulk-delete' ),
28
			'menu_title' => __( 'Bulk Delete Sites', 'bulk-delete' ),
29
		);
30
31
		$this->messages = array(
32
			'warning_message' => __( 'WARNING: Sites deleted once cannot be retrieved back. Use with caution.', 'bulk-delete' ),
33
		);
34
35
		$this->show_link_in_plugin_list = true;
36
	}
37
38
	/**
39
	 * Add Help tabs.
40
	 *
41
	 * @since 6.2.0
42
	 *
43
	 * @param array $help_tabs List of help tabs.
44
	 *
45
	 * @return array Modified list of help tabs.
46
	 */
47
	protected function add_help_tab( $help_tabs ) {
48
		$overview_tab = array(
49
			'title'    => __( 'Overview', 'bulk-delete' ),
50
			'id'       => 'overview_tab',
51
			'content'  => '<p>' . __( 'This screen contains different modules that allows you to delete sites.', 'bulk-delete' ) . '</p>',
52
			'callback' => false,
53
		);
54
55
		$help_tabs['overview_tab'] = $overview_tab;
56
57
		return $help_tabs;
58
	}
59
60
	protected function get_top_level_menu_slug() {
61
		return 'bulk-delete-users-in-multisite';
62
	}
63
}
64