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 / layout2.php

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

230 lines 6.8 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 <div class="<?php echo esc_attr( $grid_classes ); ?>">
62 <div class="<?php echo esc_attr( $item_class ); ?>">
63 <article>
64 <?php if ( $show_post_thumbnail ) { ?>
65 <div class="rtsb-post-img rtsb-img-wrap">
66 <?php
67 if ( $image_link ) {
68 $aria_label = esc_attr(
69 /* translators: Post Name */
70 sprintf( __( 'Image link for Post: %s', 'shopbuilder' ), $title )
71 );
72 ?>
73 <figure>
74 <a class="rtsb-img-link" href="<?php the_permalink(); ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>">
75 <?php
76 Fns::print_html( $img_html );
77 ?>
78 </a>
79 </figure>
80 <?php
81 } else {
82 echo '<figure class="rtsb-img-link">';
83 Fns::print_html( $img_html );
84 echo '</figure>';
85 }
86 ?>
87 <?php
88 if ( $show_categories || $show_tags ) {
89 ?>
90 <ul class="rtsb-post-taxonomy-list">
91 <?php
92 if ( $show_categories ) {
93 Fns::print_html( '<li class="rtsb-tax-item category">' );
94 Fns::print_html( PostHelpers::rtsb_posted_taxonomy() );
95 Fns::print_html( '</li>' );
96 }
97 if ( $show_tags ) {
98 Fns::print_html( '<li class="rtsb-tax-item tag">' );
99 Fns::print_html( PostHelpers::rtsb_posted_taxonomy( 'tag' ) );
100 Fns::print_html( '</li>' );
101 }
102
103 ?>
104
105 </ul>
106 <?php
107 }
108 ?>
109 </div>
110 <?php } ?>
111 <div class="rtsb-post-content">
112 <?php
113 if ( $show_dates || $show_author || $show_comment || $show_reading_time || $show_post_views ) {
114 ?>
115 <ul class="rtsb-post-meta">
116 <?php
117 if ( $show_author ) {
118 $prefix = esc_html__( 'By ', 'shopbuilder' );
119 $prefix = apply_filters( 'rtsb/general_widgets/posts_author_prefix', $prefix );
120 Fns::print_html( '<li class="rtsb-meta-item author">' );
121 if ( $show_author_icon ) {
122 Fns::print_html( $author_icon_html );
123 }
124 Fns::print_html( PostHelpers::rtsb_posted_by( $prefix ) );
125 Fns::print_html( '</li>' );
126 }
127 if ( $show_dates ) {
128 if ( $meta_separator ) {
129 Fns::print_html( '<li class="rtsb-meta-separator">' );
130 Fns::print_html( $meta_separator );
131 Fns::print_html( '</li>' );
132 }
133 Fns::print_html( '<li class="rtsb-meta-item date">' );
134 if ( $show_date_icon ) {
135 Fns::print_html( $date_icon_html );
136 }
137 Fns::print_html( PostHelpers::rtsb_posted_date() );
138 Fns::print_html( '</li>' );
139 }
140 if ( $show_comment ) {
141 if ( $meta_separator ) {
142 Fns::print_html( '<li class="rtsb-meta-separator">' );
143 Fns::print_html( $meta_separator );
144 Fns::print_html( '</li>' );
145 }
146 Fns::print_html( '<li class="rtsb-meta-item comments">' );
147 if ( $show_comment_icon ) {
148 Fns::print_html( $comment_icon_html );
149 }
150 Fns::print_html( PostHelpers::get_post_comments_number() );
151 Fns::print_html( '</li>' );
152 }
153 if ( $show_reading_time ) {
154 if ( $meta_separator ) {
155 Fns::print_html( '<li class="rtsb-meta-separator">' );
156 Fns::print_html( $meta_separator );
157 Fns::print_html( '</li>' );
158 }
159 Fns::print_html( '<li class="rtsb-meta-item reading-time">' );
160 if ( $show_reading_time_icon ) {
161 Fns::print_html( $reading_time_icon_html );
162 }
163 Fns::print_html( PostHelpers::rtsb_reading_time() );
164 Fns::print_html( '</li>' );
165 }
166 if ( $show_post_views ) {
167 if ( $meta_separator ) {
168 Fns::print_html( '<li class="rtsb-meta-separator">' );
169 Fns::print_html( $meta_separator );
170 Fns::print_html( '</li>' );
171 }
172 Fns::print_html( '<li class="rtsb-meta-item post-views">' );
173 if ( $show_post_views_icon ) {
174 Fns::print_html( $post_views_icon_html );
175 }
176 Fns::print_html( PostHelpers::rtsb_post_views() );
177 Fns::print_html( '</li>' );
178 }
179 ?>
180 </ul>
181 <?php
182 }
183 ?>
184 <?php
185 if ( $show_title ) {
186 ?>
187 <<?php Fns::print_validated_html_tag( $title_tag ); ?> class="rtsb-post-title limit-<?php echo esc_attr( $title_limit ); ?>">
188 <?php
189 if ( $title_link ) {
190 ?>
191 <a class="rtsb-title-link" href="<?php the_permalink(); ?>"><?php Fns::print_html( $title ); ?></a>
192 <?php
193 } else {
194 Fns::print_html( $title );
195 }
196 ?>
197 </<?php Fns::print_validated_html_tag( $title_tag ); ?>>
198 <?php
199 }
200 if ( $show_short_desc ) {
201 ?>
202 <div class="rtsb-post-excerpt limit-<?php Fns::print_html( $excerpt_limit ); ?>">
203 <?php Fns::print_html( $excerpt ); ?>
204 </div>
205 <?php
206 }
207 ?>
208 <?php
209 /**
210 * Button.
211 */
212 if ( $show_read_more_btn ) {
213 ?>
214 <div class="rtsb-button-wrapper">
215 <a class="rtsb-readmore-btn" href="<?php the_permalink(); ?>">
216 <span class="text-wrap">
217 <?php
218 Fns::print_html( Render::render_icon( 'left', $button_icon, $button_icon_position ) );
219 Fns::print_html( $button_text );
220 Fns::print_html( Render::render_icon( 'right', $button_icon, $button_icon_position ) );
221 ?>
222 </span>
223 </a>
224 </div>
225 <?php } ?>
226 </div>
227 </article>
228 </div>
229 </div>
230