Completed
Push — 233-feature/posts-by-post-stat... ( d2a551...3016f6 )
by Sudar
11:19 queued 07:05
created

Bulk_Delete_Pages::delete_pages_by_status()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 1
b 0
f 1
1
<?php
2
3
use BulkWP\BulkDelete\Core\Pages\Modules\DeletePagesByStatusModule;
4
5
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
6
7
/**
8
 * Utility class for deleting pages.
9
 *
10
 * All the methods from this class has been migrated to individual metabox module classes.
11
 * This class is still present for backward compatibility purpose, since some of the old add-ons still depend on this class.
12
 *
13
 * @since 6.0.0 Deprecated.
14
 */
15
class Bulk_Delete_Pages {
16
	/**
17
	 * Delete Pages by post status - drafts, pending posts, scheduled posts etc.
18
	 *
19
	 * @since  5.0
20
	 * @since 6.0.0 Deprecated.
21
	 * @static
22
	 *
23
	 * @param array $delete_options Options for deleting posts.
24
	 *
25
	 * @return int $posts_deleted  Number of posts that were deleted
26
	 */
27
	public static function delete_pages_by_status( $delete_options ) {
28
		$metabox = new DeletePagesByStatusModule();
29
30
		return $metabox->delete( $delete_options );
31
	}
32
}
33