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_hover-layout1.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_hover-layout1.php
130 lines
1 <?php
2 /**
3 * Grid Hover Layout Template - 1
4 *
5 * @package RT_TPG
6 */
7
8 use RT\ThePostGrid\Helpers\Fns;
9 use RT\ThePostGridPro\Helpers\Functions;
10
11 // Do not allow directly accessing this file.
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit( 'This script cannot be accessed directly.' );
14 }
15
16 $pID = get_the_ID();
17 $excerpt = Fns::get_the_excerpt( $pID, $data );
18 $title = Fns::get_the_title( $pID, $data );
19
20 if ( 'custom' !== $data['title_visibility_style'] ) {
21 $title = get_the_title();
22 }
23
24 /**
25 * Get post link markup
26 * $link_start, $link_end, $readmore_link_start, $readmore_link_end
27 */
28
29 $post_link = Fns::get_post_link( $pID, $data );
30
31 extract( $post_link );
32
33 // Grid Column.
34 $gird_column_desktop = '0' !== $data['gird_column'] ? $data['gird_column'] : '4';
35 $gird_column_tab = '0' !== $data['gird_column_tablet'] ? $data['gird_column_tablet'] : '6';
36 $gird_column_mobile = '0' !== $data['gird_column_mobile'] ? $data['gird_column_mobile'] : '12';
37 $col_class = "rt-col-md-{$gird_column_desktop} rt-col-sm-{$gird_column_tab} rt-col-xs-{$gird_column_mobile}";
38
39 // Column Dynamic Class.
40 $column_classes = [];
41
42 $column_classes[] .= $data['hover_animation'];
43 $column_classes[] .= 'rt-grid-hover-item rt-grid-item';
44
45 if ( 'masonry' == $data['layout_style'] ) {
46 $column_classes[] .= 'masonry-grid-item';
47 }
48
49 ?>
50
51 <div class="<?php echo esc_attr( $col_class . ' ' . implode( ' ', $column_classes ) ); ?>" data-id="<?php echo esc_attr( $pID ); ?>">
52 <div class="rt-holder tpg-post-holder">
53 <div class="rt-detail rt-el-content-wrapper">
54 <?php
55 if ( 'show' == $data['show_thumb'] ) :
56 $has_thumbnail = has_post_thumbnail() ? 'has-thumbnail' : 'has-no-thumbnail';
57 ?>
58 <div class="rt-img-holder tpg-el-image-wrap <?php echo esc_attr( $has_thumbnail ); ?>">
59 <?php Fns::get_post_thumbnail( $pID, $data, $link_start, $link_end ); ?>
60 </div>
61 <?php endif; ?>
62
63 <div class="grid-hover-content">
64 <?php
65 if ( 'show' == $data['show_title'] ) {
66 Fns::get_el_post_title( $data['title_tag'], $title, $link_start, $link_end, $data );
67 }
68 ?>
69
70 <?php if ( 'show' == $data['show_meta'] ) : ?>
71 <div class="post-meta-tags rt-el-post-meta">
72 <?php Fns::get_post_meta_html( $pID, $data ); ?>
73 </div>
74 <?php endif; ?>
75
76 <?php if ( 'show' == $data['show_excerpt'] || 'show' == $data['show_acf'] ) : ?>
77 <div class="tpg-excerpt tpg-el-excerpt">
78 <?php if ( $excerpt && 'show' == $data['show_excerpt'] ) : ?>
79 <div class="tpg-excerpt-inner">
80 <?php echo wp_kses_post( $excerpt ); ?>
81 </div>
82 <?php endif; ?>
83 <?php Fns::tpg_get_acf_data_elementor( $data, $pID ); ?>
84 </div>
85 <?php endif; ?>
86
87 <?php
88 if ( rtTPG()->hasPro() && 'show' === $data['show_social_share'] ) {
89 echo wp_kses( Functions::rtShare( $pID ), Fns::allowedHtml() );
90 }
91 ?>
92
93 <?php if ( 'show' === $data['show_read_more'] ) : ?>
94 <div class="post-footer">
95 <div class="read-more">
96 <?php
97 echo wp_kses( $readmore_link_start, Fns::allowedHtml() );
98
99 if ( 'yes' == $data['show_btn_icon'] && 'left' == $data['readmore_icon_position'] ) {
100 \Elementor\Icons_Manager::render_icon(
101 $data['readmore_btn_icon'],
102 [
103 'aria-hidden' => 'true',
104 'class' => 'left-icon',
105 ]
106 );
107 }
108
109 echo esc_html( $data['read_more_label'] );
110
111 if ( 'yes' == $data['show_btn_icon'] && 'right' == $data['readmore_icon_position'] ) {
112 \Elementor\Icons_Manager::render_icon(
113 $data['readmore_btn_icon'],
114 [
115 'aria-hidden' => 'true',
116 'class' => 'right-icon',
117 ]
118 );
119 }
120
121 echo wp_kses( $readmore_link_end, Fns::allowedHtml() );
122 ?>
123 </div>
124 </div>
125 <?php endif; ?>
126 </div>
127 </div>
128 </div>
129 </div>
130