Passed
Push — dev/6.0.1 ( 6b7af9...89c42d )
by Sudar
44:55
created

BaseQueryOverrider::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BulkWP\BulkDelete\Core\Base;
4
5
/**
6
 * Query Overrider.
7
 *
8
 * Create an instance of this class to create a new query overrider.
9
 *
10
 * @since 6.0.1
11
 */
12
abstract class BaseQueryOverrider {
13
	/**
14
	 * Parse the query object
15
	 *
16
	 * @param \WP_Query $query Query object.
17
	 */
18
	abstract public function parse_query( $query );
19
20
	/**
21
	 * Load the Query Overrider.
22
	 *
23
	 * The `parse_query` hook is set during loading.
24
	 */
25
	public function load() {
26
		add_action( 'parse_query', array( $this, 'parse_query' ) );
27
	}
28
}
29