Bulk_Delete_Post_Meta   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A delete_post_meta() 0 4 1
1
<?php
2
3
use BulkWP\BulkDelete\Core\Metas\Modules\DeletePostMetaModule;
4
5
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
6
7
/**
8
 * Utility class for deleting Post Meta.
9
 *
10
 * All the methods from this class has been migrated to `DeletePostMetaModule` class.
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 5.4
14
 * @since 6.0.0 Deprecated.
15
 */
16
class Bulk_Delete_Post_Meta {
17
	/**
18
	 * Cron Hook.
19
	 *
20
	 * @since 5.4
21
	 */
22
	const CRON_HOOK = 'do-bulk-delete-post-meta';
23
24
	/**
25
	 * Delete Post Meta.
26
	 *
27
	 * @static
28
	 *
29
	 * @since  5.4
30
	 * @since  6.0.0 Deprecated.
31
	 *
32
	 * @param array $delete_options Options for deleting.
33
	 *
34
	 * @return int Number of posts that were deleted
35
	 */
36
	public static function delete_post_meta( $delete_options ) {
37
		$module = new DeletePostMetaModule();
38
39
		return $module->delete( $delete_options );
40
	}
41
}
42