PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / templates / elementor / general / post-grid / layout1.php

layout1.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.6, at templates/elementor/general/post-grid/layout1.php

228 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template: Post List
4 *
5 * @package RadiusTheme\SB
6 */
7
8 /**
9 * Template variables:
10 *
11 * @var $grid_classes string
12 * @var $title string
13 * @var $title_link string
14 * @var $excerpt string
15 * @var $title_tag string
16 * @var $title_limit string
17 * @var $excerpt_limit string
18 * @var $button_text string
19 * @var $show_title boolean
20 * @var $show_categories boolean
21 * @var $show_tags boolean
22 * @var $show_dates boolean
23 * @var $show_author boolean
24 * @var $show_comment boolean
25 * @var $show_reading_time boolean
26 * @var $show_post_views boolean
27 * @var $show_post_thumbnail boolean
28 * @var $show_short_desc boolean
29 * @var $image_link boolean
30 * @var $show_read_more_btn boolean
31 * @var $show_author_icon boolean
32 * @var $show_comment_icon boolean
33 * @var $show_date_icon boolean
34 * @var $show_reading_time_icon boolean
35 * @var $show_post_views_icon boolean
36 * @var $img_html string
37 * @var $button_icon array
38 * @var $button_icon_position string
39 * @var $item_class string
40 * @var $author_icon_html string
41 * @var $date_icon_html string
42 * @var $comment_icon_html string
43 * @var $reading_time_icon_html string
44 * @var $post_views_icon_html string
45 * @var $meta_separator string
46 * array
47 */
48
49 // Do not allow directly accessing this file.
50
51
52 use RadiusTheme\SB\Elementor\Helper\PostHelpers;
53 use RadiusTheme\SB\Elementor\Widgets\General\PostList\Render;
54 use RadiusTheme\SB\Helpers\Fns;
55
56 if ( ! defined( 'ABSPATH' ) ) {
57 exit( 'This script cannot be accessed directly.' );
58 }
59
60
61 ?>
62 <div class="<?php echo esc_attr( $grid_classes ); ?>">
63 <div class="<?php echo esc_attr( $item_class ); ?>">
64 <article>
65 <?php if ( $show_post_thumbnail ) { ?>
66 <div class="rtsb-post-img rtsb-img-wrap">
67 <?php
68 if ( $image_link ) {
69 $aria_label = esc_attr(
70 /* translators: Post Name */
71 sprintf( __( 'Image link for Post: %s', 'shopbuilder' ), $title )
72 );
73 ?>
74 <figure>
75 <a class="rtsb-img-link" href="<?php the_permalink(); ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>">
76 <?php
77 Fns::print_html( $img_html );
78 ?>
79 </a>
80 </figure>
81 <?php
82 } else {
83 echo '<figure class="rtsb-img-link">';
84 Fns::print_html( $img_html );
85 echo '</figure>';
86 }
87 ?>
88 </div>
89 <?php } ?>
90 <div class="rtsb-post-content">
91 <?php
92 if ( $show_categories || $show_tags ) {
93 ?>
94 <ul class="rtsb-post-taxonomy-list">
95 <?php
96 if ( $show_categories ) {
97 Fns::print_html( '<li class="rtsb-tax-item category">' );
98 Fns::print_html( PostHelpers::rtsb_posted_taxonomy() );
99 Fns::print_html( '</li>' );
100 }
101 if ( $show_tags ) {
102 Fns::print_html( '<li class="rtsb-tax-item tag">' );
103 Fns::print_html( PostHelpers::rtsb_posted_taxonomy( 'tag' ) );
104 Fns::print_html( '</li>' );
105 }
106 ?>
107
108 </ul>
109 <?php
110 }
111 ?>
112 <?php
113 if ( $show_title ) {
114 ?>
115 <<?php Fns::print_validated_html_tag( $title_tag ); ?> class="rtsb-post-title limit-<?php echo esc_attr( $title_limit ); ?>">
116 <?php
117 if ( $title_link ) {
118 ?>
119 <a class="rtsb-title-link" href="<?php the_permalink(); ?>"><?php Fns::print_html( $title ); ?></a>
120 <?php
121 } else {
122 Fns::print_html( $title );
123 }
124 ?>
125 </<?php Fns::print_validated_html_tag( $title_tag ); ?>>
126 <?php
127 }
128 if ( $show_dates || $show_author || $show_comment || $show_reading_time || $show_post_views ) {
129 ?>
130 <ul class="rtsb-post-meta">
131 <?php
132 if ( $show_author ) {
133 $prefix = esc_html__( 'By ', 'shopbuilder' );
134 $prefix = apply_filters( 'rtsb/general_widgets/posts_author_prefix', $prefix );
135 Fns::print_html( '<li class="rtsb-meta-item author">' );
136 if ( $show_author_icon ) {
137 Fns::print_html( $author_icon_html );
138 }
139 Fns::print_html( PostHelpers::rtsb_posted_by( $prefix ) );
140 Fns::print_html( '</li>' );
141 }
142 if ( $show_dates ) {
143 if ( $meta_separator ) {
144 Fns::print_html( '<li class="rtsb-meta-separator">' );
145 Fns::print_html( $meta_separator );
146 Fns::print_html( '</li>' );
147 }
148 Fns::print_html( '<li class="rtsb-meta-item date">' );
149 if ( $show_date_icon ) {
150 Fns::print_html( $date_icon_html );
151 }
152 Fns::print_html( PostHelpers::rtsb_posted_date() );
153 Fns::print_html( '</li>' );
154 }
155 if ( $show_comment ) {
156 if ( $meta_separator ) {
157 Fns::print_html( '<li class="rtsb-meta-separator">' );
158 Fns::print_html( $meta_separator );
159 Fns::print_html( '</li>' );
160 }
161 Fns::print_html( '<li class="rtsb-meta-item comments">' );
162 if ( $show_comment_icon ) {
163 Fns::print_html( $comment_icon_html );
164 }
165 Fns::print_html( PostHelpers::get_post_comments_number() );
166 Fns::print_html( '</li>' );
167 }
168 if ( $show_reading_time ) {
169 if ( $meta_separator ) {
170 Fns::print_html( '<li class="rtsb-meta-separator">' );
171 Fns::print_html( $meta_separator );
172 Fns::print_html( '</li>' );
173 }
174 Fns::print_html( '<li class="rtsb-meta-item reading-time">' );
175 if ( $show_reading_time_icon ) {
176 Fns::print_html( $reading_time_icon_html );
177 }
178 Fns::print_html( PostHelpers::rtsb_reading_time() );
179 Fns::print_html( '</li>' );
180 }
181 if ( $show_post_views ) {
182 if ( $meta_separator ) {
183 Fns::print_html( '<li class="rtsb-meta-separator">' );
184 Fns::print_html( $meta_separator );
185 Fns::print_html( '</li>' );
186 }
187 Fns::print_html( '<li class="rtsb-meta-item post-views">' );
188 if ( $show_post_views_icon ) {
189 Fns::print_html( $post_views_icon_html );
190 }
191 Fns::print_html( PostHelpers::rtsb_post_views() );
192 Fns::print_html( '</li>' );
193 }
194 ?>
195 </ul>
196 <?php
197 }
198 if ( $show_short_desc ) {
199 ?>
200 <div class="rtsb-post-excerpt limit-<?php Fns::print_html( $excerpt_limit ); ?>">
201 <?php Fns::print_html( $excerpt ); ?>
202 </div>
203 <?php
204 }
205 ?>
206 <?php
207 /**
208 * Button.
209 */
210 if ( $show_read_more_btn ) {
211 ?>
212 <div class="rtsb-button-wrapper">
213 <a class="rtsb-readmore-btn" href="<?php the_permalink(); ?>">
214 <span class="text-wrap">
215 <?php
216 Fns::print_html( Render::render_icon( 'left', $button_icon, $button_icon_position ) );
217 Fns::print_html( $button_text );
218 Fns::print_html( Render::render_icon( 'right', $button_icon, $button_icon_position ) );
219 ?>
220 </span>
221 </a>
222 </div>
223 <?php } ?>
224 </div>
225 </article>
226 </div>
227 </div>
228