Completed
Push — dev/6.0.0 ( d8cc34...1147b4 )
by Sudar
07:06
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 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
use BulkWP\BulkDelete\Core\Pages\Metabox\DeletePagesByStatusMetabox;
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
	/**
18
	 * Delete Pages by post status - drafts, pending posts, scheduled posts etc.
19
	 *
20
	 * @since  5.0
21
	 * @since 6.0.0 Deprecated.
22
	 * @static
23
	 *
24
	 * @param array $delete_options Options for deleting posts.
25
	 *
26
	 * @return int $posts_deleted  Number of posts that were deleted
27
	 */
28
	public static function delete_pages_by_status( $delete_options ) {
29
		$metabox = new DeletePagesByStatusMetabox();
30
31
		return $metabox->delete( $delete_options );
32
	}
33
}
34