Completed
Push — 190-feature/delete-posts-by-cu... ( 77e5c8...77e5c8 )
by Rajan
08:34 queued 04:53
created

DeletePostsByCustomTaxonomMetabox   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 1 1
A convert_user_input_to_options() 0 6 1
A delete() 0 1 1
A get_success_message() 0 1 1
A render() 0 1 1
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Posts\Metabox;
4
5
use BulkWP\BulkDelete\Core\Posts\PostsMetabox;
6
7
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
9
/**
10
 * Delete Posts by Custom Taxonom Metabox.
11
 *
12
 * @since 6.0.0
13
 */
14
class DeletePostsByCustomTaxonomMetabox extends PostsMetabox {
15
	protected function initialize() {
16
	}
17
18
	public function render() {
19
	}
20
21
	protected function convert_user_input_to_options( $request, $options ) {
22
		$options['post_status'] = array_map( 'sanitize_text_field', bd_array_get( $request, 'smbd_post_status', array() ) );
0 ignored issues
show
Bug introduced by
array() of type array is incompatible with the type string expected by parameter $default of bd_array_get(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

22
		$options['post_status'] = array_map( 'sanitize_text_field', bd_array_get( $request, 'smbd_post_status', /** @scrutinizer ignore-type */ array() ) );
Loading history...
23
24
		$options['delete-sticky-posts'] = bd_array_get_bool( $request, 'smbd_sticky', false );
25
26
		return $options;
27
	}
28
29
	public function delete( $delete_options ) {
30
	}
31
32
	protected function get_success_message( $items_deleted ) {
33
	}
34
}
35