Passed
Pull Request — dev/6.0.0 (#572)
by
unknown
41:10 queued 26:12
created

BulkDeleteSystemInfo::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\SystemInfo;
4
5
use Sudar\WPSystemInfo\SystemInfo;
6
7
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
9
/**
10
 * Email Log System Info.
11
 *
12
 * Uses the WPSystemInfo library.
13
 *
14
 * @since 2.3.0
15
 * @link https://github.com/sudar/wp-system-info
16
 */
17
class BulkDeleteSystemInfo extends SystemInfo {
18
	/**
19
	 * Setup hooks and filters.
20
	 */
21
	public function load() {
22
		add_action( 'before_system_info_for_bulk-delete', array( $this, 'print_bulk_delete_details' ) );
23
	}
24
25
	/**
26
	 * Print details about Bulk Delete.
27
	 *
28
	 * PHPCS is disabled for this function since alignment will mess up the system info output.
29
	 * phpcs:disable
30
	 */
31
	public function print_bulk_delete_details() {
32
	?>
33
-- Bulk Delete Configuration --
34
Bulk Delete Version: <?php echo Bulk_Delete::VERSION . "\n"; ?>
0 ignored issues
show
Bug introduced by
The type BulkWP\BulkDelete\Core\SystemInfo\Bulk_Delete was not found. Did you mean Bulk_Delete? If so, make sure to prefix the type with \.
Loading history...
35
36
<?php
37
	}
38
	// phpcs:enable
39
40
	/**
41
	 * Change the default config.
42
	 *
43
	 * @return array Modified config.
44
	 */
45
	protected function get_default_config() {
46
		$config = parent::get_default_config();
47
48
		$config['show_posts']      = false;
49
		$config['show_taxonomies'] = false;
50
		$config['show_users']      = false;
51
52
		return $config;
53
	}
54
}
55