Passed
Push — 178-feature/delete-terms--by-p... ( e7322c...6384b3 )
by Rajan
08:46
created

DeleteTermsPage::get_bulkwp_menu_position()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 9
ccs 0
cts 2
cp 0
crap 2
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Terms;
4
5
use BulkWP\BulkDelete\Core\Base\BaseDeletePage;
6
7
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
9
/**
10
 * Bulk Delete Terms Page.
11
 *
12
 * Shows the list of modules that allows you to delete posts.
13
 *
14
 * @since 6.0.0
15
 */
16
class DeleteTermsPage extends BaseDeletePage {
17
18
	/**
19
	 * Initialize and setup variables.
20
	 */
21
	protected function initialize() {
22
		$this->page_slug  = 'bulk-delete-terms';
23
		$this->item_type  = 'terms';
24
		$this->capability = 'delete_posts';
25
26
		$this->label = array(
27
			'page_title' => __( 'Bulk Delete Terms', 'bulk-delete' ),
28
			'menu_title' => __( 'Bulk Delete Terms', 'bulk-delete' ),
29
		);
30
31
		$this->messages = array(
32
			'warning_message' => __( 'WARNING: Terms 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
	 * @param array $help_tabs Help tabs.
42
	 *
43
	 * @return array Modified list of tabs.
44
	 */
45
	protected function add_help_tab( $help_tabs ) {
46
		$overview_tab = array(
47
			'title'    => __( 'Overview', 'bulk-delete' ),
48
			'id'       => 'overview_tab',
49
			'content'  => '<p>' . __( 'This screen contains different modules that allows you to delete posts or schedule them for deletion.', 'bulk-delete' ) . '</p>',
50
			'callback' => false,
51
		);
52
53
		$help_tabs['overview_tab'] = $overview_tab;
54
55
		return $help_tabs;
56
	}
57
}
58