Passed
Push — 341-feature/implement-link-on-... ( 162bd2...c83084 )
by Maria Daniel Deepak
12:26
created

PagesModule::get_trash_url()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
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 2
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Pages;
4
5
use BulkWP\BulkDelete\Core\Posts\PostsModule;
6
7 1
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
9
/**
10
 * Module for deleting pages.
11
 *
12
 * This class extends PostsModule since Page is a type of Post.
13
 *
14
 * @since 6.0.0
15
 */
16
abstract class PagesModule extends PostsModule {
17
	protected $item_type = 'pages';
18
19
	public function filter_js_array( $js_array ) {
20
		$js_array['dt_iterators'][] = '_pages';
21
22
		return $js_array;
23
	}
24
25
	/**
26
	 * {@inheritDoc}
27
	 */
28
	protected function get_trash_url() {
29
		return admin_url( 'edit.php?post_status=trash&post_type=page' );
30
	}
31
}
32