Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | public static function find_query($args = false) { |
||
12 | |||
13 | $default_args = array('fields' => 'ids'); |
||
14 | |||
15 | if (!$args) { |
||
16 | |||
17 | return self::get_current_query(); |
||
18 | |||
19 | } elseif (is_array($args)) { |
||
20 | |||
21 | $args = array_merge($default_args, $args); |
||
22 | |||
23 | return new WP_Query($args); |
||
24 | |||
25 | } else { |
||
26 | |||
27 | return new WP_Query($default_args); |
||
28 | |||
29 | } |
||
30 | } |
||
31 | |||
71 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.