| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | public static function find_query( $args = false ) { |
||
| 13 | |||
| 14 | $default_args = array(); |
||
| 15 | |||
| 16 | if ( ! $args ) { |
||
| 17 | |||
| 18 | return self::get_current_query(); |
||
| 19 | |||
| 20 | } elseif ( is_array( $args ) ) { |
||
| 21 | |||
| 22 | $args = array_merge( $default_args, $args ); |
||
|
|
|||
| 23 | |||
| 24 | return new \WP_Query( $args ); |
||
| 25 | |||
| 26 | } else { |
||
| 27 | |||
| 28 | return new \WP_Query( $default_args ); |
||
| 29 | |||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 71 |