DeletePostsByUserRoleModule::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 12
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 14
ccs 0
cts 13
cp 0
crap 2
rs 9.8666
1
<?php
2
3
namespace BulkWP\BulkDelete\Deprecated\Addons;
4
5
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
6
7
/**
8
 * Adds backward compatibility for Bulk Delete Posts By User Role add-on v0.5 or below.
9
 *
10
 * This module will eventually be removed once the add-on is updated.
11
 *
12
 * @since 6.0.0
13
 */
14
class DeletePostsByUserRoleModule extends DeprecatedModule {
15
	protected function initialize() {
16
		$this->addon_class_name = 'Bulk_Delete_Posts_By_User_Role';
17
		$this->addon_slug       = 'bulk-delete-posts-by-user';
18
19
		$this->item_type     = 'posts';
20
		$this->field_slug    = '';
21
		$this->meta_box_slug = 'bd_post_by_user_role';
22
		$this->action        = 'delete_posts_by_user_role';
23
		$this->cron_hook     = '';
24
		$this->scheduler_url = '';
25
		$this->messages      = array(
26
			'box_label'  => __( 'Delete Posts By User Role', 'bulk-delete' ),
27
			'scheduled'  => '',
28
			'cron_label' => '',
29
		);
30
	}
31
32
	/**
33
	 * Call the render method of the add-on.
34
	 */
35
	public function render() {
36
		\Bulk_Delete_Posts_By_User_Role::render_delete_posts_by_user_role_box();
0 ignored issues
show
Bug introduced by
The type Bulk_Delete_Posts_By_User_Role was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
37
	}
38
}
39