PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 7.0.2
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v7.0.2
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-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-layout1.php
95 lines
1 <?php
2 /**
3 * Grid Layout Template - 1
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 //Grid Column:
31 $grid_column_desktop = '0' !== $data['grid_column'] ? $data['grid_column'] : '4';
32 $grid_column_tab = '0' !== $data['grid_column_tablet'] ? $data['grid_column_tablet'] : '6';
33 $grid_column_mobile = '0' !== $data['grid_column_mobile'] ? $data['grid_column_mobile'] : '12';
34 $col_class = "rt-col-md-{$grid_column_desktop} rt-col-sm-{$grid_column_tab} rt-col-xs-{$grid_column_mobile}";
35
36 // Column Dynamic Class.
37 $column_classes = [];
38
39 $column_classes[] .= $data['hover_animation'];
40 $column_classes[] .= 'rt-grid-item';
41
42 if ( 'masonry' == $data['layout_style'] ) {
43 $column_classes[] .= 'masonry-grid-item';
44 }
45 ?>
46
47 <div <?php post_class( esc_attr( $col_class . ' ' . implode( ' ', $column_classes ) ) ); ?>
48 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
73 <?php if ( 'show' == $data['show_excerpt'] || 'show' == $data['show_acf'] ) : ?>
74 <div class="tpg-excerpt tpg-el-excerpt">
75 <?php if ( $excerpt && 'show' == $data['show_excerpt'] ) : ?>
76 <div class="tpg-excerpt-inner">
77 <?php echo wp_kses_post( $excerpt ); ?>
78 </div>
79 <?php endif; ?>
80 <?php Fns::tpg_get_acf_data_elementor( $data, $pID ); ?>
81 </div>
82 <?php endif; ?>
83
84 <?php
85 if ( rtTPG()->hasPro() && 'show' === $data['show_social_share'] ) {
86 echo wp_kses( \RT\ThePostGridPro\Helpers\Functions::rtShare( $pID ), Fns::allowedHtml() );
87 }
88 if ( 'show' === $data['show_read_more'] && $data['read_more_label'] ) {
89 Fns::get_read_more_button( $data, $readmore_link_start, $readmore_link_end );
90 }
91 ?>
92 </div>
93 </div>
94 </div>
95