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 | $date = new \DateTime(); |
||
26 | $cache = MslsSqlCacher::init( __CLASS__ )->set_params( $this->args ); |
||
27 | |||
28 | $this->arr[ $language ] = $cache->get_var( |
||
29 | $cache->prepare( |
||
30 | "SELECT count(ID) FROM {$cache->posts} WHERE DATE(post_date) = %s AND post_status = 'publish'", |
||
31 | $date->setDate( $this->get_arg( 0, 0 ), $this->get_arg( 1, 0 ), $this->get_arg( 2, 0 ) )->format( 'Y-m-d' ) |
||
32 | ) |
||
33 | ); |
||
34 | } |
||
35 | return (bool) $this->arr[ $language ]; |
||
36 | } |
||
37 | |||
48 |