Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function has_value( $language ) { |
||
24 | if ( ! isset( $this->arr[ $language ] ) ) { |
||
25 | $cache = MslsSqlCacher::init( __CLASS__ )->set_params( $this->args ); |
||
26 | |||
27 | $this->arr[ $language ] = $cache->get_var( |
||
28 | $cache->prepare( |
||
29 | "SELECT count(ID) FROM {$cache->posts} WHERE YEAR(post_date) = %d AND MONTH(post_date) = %d AND post_status = 'publish'", |
||
30 | $this->get_arg( 0, 0 ), |
||
31 | $this->get_arg( 1, 0 ) |
||
32 | ) |
||
33 | ); |
||
34 | } |
||
35 | return (bool) $this->arr[ $language ]; |
||
36 | } |
||
37 | |||
48 |