HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/shaping-sar.ru/public_html/wp-content/themes/beauty spa/builder/template/daily_specials.php
<?php
extract( shortcode_atts( array(
'title'     => '',
'span'      => '',
'title_animation' => '',
'list' => 'yes',
'list_animation' => '',
'fillter_animation'     => '',
), $atts ) );

$wow = ($title_animation != '') ? 'wow '.$title_animation : '';

?>

<h1 class="<?php echo esc_attr($wow); ?>" data-wow-delay="0.6s"><?php echo esc_attr($title); ?><span> <?php echo esc_attr($span) ?></span> </h1>
<?php if($list == 'yes') : ?>
<div class="bigIcon view-type <?php if($list_animation != '') echo 'wow '.esc_attr($list_animation); ?>" data-wow-delay="0.9s">
	<a class="viewList active" href="#" title="<?php _e('List View', IZ_LANG) ?>"><i class="fa fa-list"></i><?php _e('List View', IZ_LANG) ?></a>
    <a class="viewGrid" href="#" title="<?php _e('Grid View', IZ_LANG) ?>"><i class="fa fa-th"></i><?php _e('Grid View', IZ_LANG) ?></a>
</div><div class="clearfix"></div>
<?php endif; ?>

<!-- WEEKLY SPECILAS SLIDER -->
<div id="specialCarousel" class="carousel slide " data-wow-delay="0.9s" data-ride="carousel">
  <!-- Indicators -->
<?php 
     $args = array( 'menu_order' => 'ASC', 'hide_empty' => true );
     $terms = get_terms('daily', $args);
     // var_dump($terms);
     $i = 0;
?>
  <ol class="carousel-indicators list-inline <?php if($fillter_animation != '') echo 'wow '.esc_attr($fillter_animation); ?>" data-wow-delay="1.2s">
  <?php 
    foreach ($terms as $key => $value) {
        if($i === 0)
        {
            echo '<li data-target="#specialCarousel" data-slide-to="'.$i.'" class="active">'.esc_attr($value->name).'</li>'    ;
        }else
        {
            echo '<li data-target="#specialCarousel" data-slide-to="'.$i.'">'.esc_attr($value->name).'</li>';
        }
        $i++;
    } 
  ?>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner">
        <?php
        $i = 0;
        foreach ($terms as $key => $value) {
            if($i === 0)
            {
                echo '<div class="item active">';
            }else
            {
                echo '<div class="item">';
            }
            $i++;
            $args = array(
                'post_type' => 'iz_menu',
                'posts_per_page' => -1,
                'tax_query' => array(
                    array(
                      'taxonomy' => 'daily',
                      'field'    => 'id',
                      'terms'    => $value->term_id,
                    ),
                  ),
            );
            $menu = new WP_Query($args);
            while ($menu->have_posts()) {
                $menu->the_post();
                
                ?>
                <div class="food-item clearfix">
                    <div class="food-img">
                        <?php 
                            if(has_post_thumbnail()) 
                            {
                                the_post_thumbnail('iz-meal-thumbnail', array('class'=> 'img-responsive')); 
                            }
                            else
                            {
                                echo '<img class="img-responsive" src="'.esc_url(iz_image_placeholder_url()).'" alt="'.__('Special Food menu', IZ_LANG).'" />';     
                            }
                            $gallery = get_post_meta(get_the_ID(), '_iz_gallery', true);
                            $gallery = json_decode($gallery);
                            if(is_array($gallery))
                            {
                                foreach ($gallery as $id) {
                                    if($id != '')
                                    {
                                        $image_url = wp_get_attachment_url($id);
                                        if($image_url != '')
                                        echo '<a href="'.$image_url.'" data-gal="prettyPhoto[gallery-'.get_the_ID().'-'.$value->term_id.']" title="'.get_the_title(get_the_ID()).'"></a>';
                                    }
                                }
                            }
                        ?>
                    </div>
                    <div class="food-info">
                        <h4><?php the_title() ?></h4>
                        <?php the_content(); ?>
                        <strong><?php echo get_post_meta(get_the_ID(), '_iz_menu_service', true); ?></strong>
                    </div>
                    <h4 class="food-price"><?php echo iz_price(get_post_meta(get_the_ID(), '_iz_menu_price', true)); ?></h4>
                </div>
                <?php
            }
            echo '</div>';
        }
        ?>
        <!-- SPECIAL ON MONDAY -->
		</div><!-- end carousel inner -->
</div><!-- end specialCarousel -->