|
1 | 1 | <?php |
2 | | - $gallery_objects = get_post_meta( get_the_ID(), 'post_gallery', false ); |
3 | | -if ( ! empty( $gallery_objects ) ) { |
| 2 | + $gallery_objects = get_post_meta(get_the_ID(), 'post_gallery', false); |
| 3 | +if (! empty($gallery_objects)) { |
4 | 4 | echo '<div class="glide entry-gallery">'; |
5 | | - echo '<div class="glide__track" data-glide-el="track">'; |
6 | | - echo '<ul class="glide__slides">'; |
7 | | - foreach ( $gallery_objects as $object ) { |
| 5 | + echo '<div class="glide__track" data-glide-el="track">'; |
| 6 | + echo '<ul class="glide__slides">'; |
| 7 | + foreach ($gallery_objects as $object) { |
8 | 8 | echo '<li class="glide__slide">'; |
9 | | - echo wp_get_attachment_image( $object, 'landscape-featured' ); |
| 9 | + echo wp_get_attachment_image($object, 'landscape-featured'); |
10 | 10 | echo '</li>'; |
11 | 11 | } |
12 | | - echo '</ul>'; |
13 | | - echo '</div>'; |
14 | | - echo '<div class="glide__arrows" data-glide-el="controls">'; |
15 | | - echo '<button class="glide__arrow glide__arrow--left" data-glide-dir="<"><i class="icon chevron-left"></i></button>'; |
16 | | - echo '<button class="glide__arrow glide__arrow--right" data-glide-dir=">"><i class="icon chevron-right"></i></button>'; |
17 | | - echo '</div>'; |
18 | | - echo '</div>'; |
| 12 | + echo '</ul>'; |
| 13 | + echo '</div>'; |
| 14 | + echo '<div class="glide__arrows" data-glide-el="controls">'; |
| 15 | + echo '<button class="glide__arrow glide__arrow--left" data-glide-dir="<"><i class="icon chevron-left"></i></button>'; |
| 16 | + echo '<button class="glide__arrow glide__arrow--right" data-glide-dir=">"><i class="icon chevron-right"></i></button>'; |
| 17 | + echo '</div>'; |
| 18 | + echo '</div>'; |
19 | 19 | } |
20 | 20 | ?> |
21 | 21 | <h2><?php the_title(); ?></h2> |
22 | 22 | <?php |
23 | | - global $_set; |
24 | | - $settings = $_set->settings; |
25 | | -if ( $settings['show_authors'] ) { |
26 | | - get_template_part( 'inc/partials/entry/entry', 'author' ); |
27 | | -} else { |
28 | | - echo '<span class="entry-date">' . get_the_date( CC_Site::get_date_format() ) . '</span>'; |
29 | | -} |
| 23 | + $show_authors_is_enabled = get_theme_mod('cc_base_show_authors'); |
| 24 | + |
| 25 | + if ($show_authors_is_enabled) { |
| 26 | + get_template_part('inc/partials/entry/entry', 'author'); |
| 27 | + } else { |
| 28 | + echo '<span class="entry-date">' . get_the_date(CC_Site::get_date_format()) . '</span>'; |
| 29 | + } |
30 | 30 | ?> |
31 | 31 | <?php |
32 | | -if ( function_exists( 'yoast_breadcrumb' ) ) { |
33 | | - yoast_breadcrumb( '<p id="breadcrumbs">', '</p>' ); |
34 | | -} |
| 32 | + if (function_exists('yoast_breadcrumb')) { |
| 33 | + yoast_breadcrumb('<p id="breadcrumbs">', '</p>'); |
| 34 | + } |
35 | 35 | ?> |
0 commit comments