PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 4.2.0
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v4.2.0
7.9.3 7.9.2 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.2.0 4.2.1 4.2.2 4.2.3 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 6.0.0 7.0.0 7.0.1 7.0.2 7.1.0 7.2.0 7.2.1 7.2.10 7.2.11 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.8 7.2.9 7.3.0 7.3.1 7.4.0 7.4.1 7.4.2 7.4.3 7.5.0 7.6.0 7.6.1 7.7.0 7.7.1 7.7.10 7.7.11 7.7.12 7.7.13 7.7.14 7.7.15 7.7.16 7.7.17 7.7.18 7.7.19 7.7.2 7.7.20 7.7.21 7.7.22 7.7.3 7.7.4 7.7.5 7.7.6 7.7.7 7.7.8 7.7.9 7.8.0 7.8.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.9.0 7.9.1
the-post-grid / templates / elementor / grid-layout4.php
the-post-grid / templates / elementor Last commit date
grid-layout1.php 3 years ago grid-layout3.php 3 years ago grid-layout4.php 3 years ago grid_hover-layout1.php 3 years ago grid_hover-layout2.php 3 years ago grid_hover-layout3.php 3 years ago list-layout1.php 3 years ago list-layout2.php 3 years ago list-layout3.php 3 years ago
grid-layout4.php
127 lines
1 <?php
2 /**
3 * Grid Layout Template - 4
4 *
5 * @package RT_TPG
6 */
7
8 use RT\ThePostGrid\Helpers\Fns;
9
10 // Do not allow directly accessing this file.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14
15 $pID = get_the_ID();
16 $excerpt = Fns::get_the_excerpt( $pID, $data );
17 $title = Fns::get_the_title( $pID, $data );
18
19 if ( 'custom' !== $data['title_visibility_style'] ) {
20 $title = get_the_title();
21 }
22 /**
23 * Get post link markup
24 * $link_start, $link_end, $readmore_link_start, $readmore_link_end
25 */
26
27 $post_link = Fns::get_post_link( $pID, $data );
28 extract( $post_link );
29
30
31 // Grid Column.
32 $gird_column_desktop = '0' !== $data['gird_column'] ? $data['gird_column'] : '4';
33 $gird_column_tab = '0' !== $data['gird_column_tablet'] ? $data['gird_column_tablet'] : '6';
34 $gird_column_mobile = '0' !== $data['gird_column_mobile'] ? $data['gird_column_mobile'] : '12';
35 $col_class = "rt-col-md-{$gird_column_desktop} rt-col-sm-{$gird_column_tab} rt-col-xs-{$gird_column_mobile}";
36
37 // Column Dynamic Class.
38 $column_classes = [];
39
40 $column_classes[] .= $data['hover_animation'];
41 $column_classes[] .= 'rt-grid-item';
42
43 if ( 'masonry' == $data['layout_style'] ) {
44 $column_classes[] .= 'masonry-grid-item';
45 }
46 ?>
47
48 <div class="<?php echo esc_attr( $col_class . ' ' . implode( ' ', $column_classes ) ); ?>" data-id="<?php echo esc_attr( $pID ); ?>">
49 <div class="rt-holder tpg-post-holder">
50 <div class="rt-detail rt-el-content-wrapper">
51 <?php
52 if ( 'show' == $data['show_thumb'] ) :
53 $has_thumbnail = has_post_thumbnail() ? 'has-thumbnail' : 'has-no-thumbnail';
54 ?>
55 <div class="rt-img-holder tpg-el-image-wrap <?php echo esc_attr( $has_thumbnail ); ?>">
56 <?php Fns::get_post_thumbnail( $pID, $data, $link_start, $link_end ); ?>
57 </div>
58 <?php endif; ?>
59
60 <?php
61 if ( 'show' == $data['show_title'] ) {
62 Fns::get_el_post_title( $data['title_tag'], $title, $link_start, $link_end, $data );
63 }
64 ?>
65
66 <?php if ( 'show' == $data['show_meta'] ) : ?>
67 <div class="post-meta-tags rt-el-post-meta">
68 <?php Fns::get_post_meta_html( $pID, $data ); ?>
69 </div>
70 <?php endif; ?>
71
72 <?php if ( 'show' == $data['show_excerpt'] || 'show' == $data['show_acf'] ) : ?>
73 <div class="tpg-excerpt tpg-el-excerpt">
74 <?php if ( $excerpt && 'show' == $data['show_excerpt'] ) : ?>
75 <div class="tpg-excerpt-inner">
76 <?php echo wp_kses_post( $excerpt ); ?>
77 </div>
78 <?php endif; ?>
79 <?php Fns::tpg_get_acf_data_elementor( $data, $pID ); ?>
80 </div>
81 <?php endif; ?>
82
83 <?php
84 if ( 'show' === $data['show_social_share'] ) {
85 echo wp_kses( \RT\ThePostGridPro\Helpers\Functions::rtShare( $pID ), Fns::allowedHtml() );
86 }
87 ?>
88
89
90 <?php if ( 'show' === $data['show_read_more'] ) : ?>
91 <div class="post-footer">
92 <div class="read-more">
93 <?php
94 echo wp_kses( $readmore_link_start, Fns::allowedHtml() );
95
96 if ( 'yes' == $data['show_btn_icon'] && 'left' == $data['readmore_icon_position'] ) {
97 \Elementor\Icons_Manager::render_icon(
98 $data['readmore_btn_icon'],
99 [
100 'aria-hidden' => 'true',
101 'class' => 'left-icon',
102 ]
103 );
104 }
105
106 echo esc_html( $data['read_more_label'] );
107
108 if ( 'yes' == $data['show_btn_icon'] && 'right' == $data['readmore_icon_position'] ) {
109 \Elementor\Icons_Manager::render_icon(
110 $data['readmore_btn_icon'],
111 [
112 'aria-hidden' => 'true',
113 'class' => 'right-icon',
114 ]
115 );
116 }
117
118 echo wp_kses( $readmore_link_end, Fns::allowedHtml() );
119 ?>
120 </div>
121
122 </div>
123 <?php endif; ?>
124 </div>
125 </div>
126 </div>
127