Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $wp_time = current_time( 'timestamp', 0 );
- $chat_time = get_field('chat_time', 'option');
- $chat_time_from = array();
- $chat_time_till = array();
- foreach($chat_time as $ct) {
- $chat_time_from = strtotime($ct['chat_time_from']);
- $chat_time_till = strtotime($ct['chat_time_till']);
- if ($wp_time >= $chat_time_from && $wp_time <= $chat_time_till) {
- echo "show";
- } else {
- echo "dont";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement