| | |
| | | <?php |
| | | |
| | | use JVBase\base\Options; |
| | | use JVBase\base\options; |
| | | use JVBase\base\Site; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\registrar\Registrar; |
| | |
| | | if (!Site::has('limit_hours')) { |
| | | return true; |
| | | } |
| | | if (Options::get('open_to_public') !== '1') { |
| | | if ( options::get('open_to_public') !== '1') { |
| | | return false; |
| | | } |
| | | if (!empty(Options::get('today_hours'))) { |
| | | if (!empty(options::get('today_hours'))) { |
| | | return jvbIsTimeBetween(); |
| | | } |
| | | return jvbIsCurrentlyOpen(); |
| | |
| | | |
| | | function jvbTermHasPosts(int $termID, string $taxonomy):bool |
| | | { |
| | | $cache = Cache::for('termUtility', 30*60)->connect('taxonomy'); |
| | | $cache = Cache::for('termUtility', 'term', 30*60); |
| | | return $cache->remember( |
| | | $termID, |
| | | function() use($taxonomy, $termID) { |