| | |
| | | <?php |
| | | |
| | | use JVBase\base\Options; |
| | | use JVBase\base\Site; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\registrar\Registrar; |
| | |
| | | } |
| | | |
| | | |
| | | //function jvbIsOpen():bool |
| | | //{ |
| | | // |
| | | // if (!jvbCheck('limit_hours', JVB_SITE)) { |
| | | // return true; |
| | | // } |
| | | // if (get_option(BASE.'open_to_public') !== '1') { |
| | | // return false; |
| | | // } |
| | | // //Check if today_hours is set |
| | | // if (get_option(BASE.'today_hours')) { |
| | | // return jvbIsTimeBetween(); |
| | | // } |
| | | // //Default to the stored settings |
| | | // return jvbIsCurrentlyOpen(); |
| | | //} |
| | | |
| | | function jvbIsOpen():bool |
| | | { |
| | | if (!Site::has('limit_hours')) { |
| | | return true; |
| | | } |
| | | if (Options::get('open_to_public') !== 1) { |
| | | error_log('Not open to public'); |
| | | return false; |
| | | } |
| | | if (Options::get('today_hours')) { |
| | | return jvbIsTimeBetween(); |
| | | } |
| | | return jvbIsCurrentlyOpen(); |
| | | } |
| | | |
| | | |
| | | function jvbTermHasPosts(int $termID, string $taxonomy):bool |