PluginProbe
Powerkit – Supercharge your WordPress Site / 2.4.4
Powerkit – Supercharge your WordPress Site v2.4.4
3.1.1 3.1.0 3.0.9 3.0.8 trunk 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 All 87 releases
powerkit / modules / inline-posts / public / inline-posts-template.php

inline-posts-template.php in Powerkit – Supercharge your WordPress Site 2.4.4, at modules/inline-posts/public/inline-posts-template.php

81 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Posts Template
4 *
5 * @link https://codesupply.co
6 * @since 1.0.0
7 *
8 * @package PowerKit
9 * @subpackage PowerKit/templates
10 */
11
12 /**
13 * Default Template
14 *
15 * @param array $posts Array of posts.
16 * @param array $settings Array of settings.
17 */
18 function powerkit_inline_posts_default_template( $posts, $settings ) {
19 ?>
20 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
21 <div class="pk-post-outer">
22
23 <?php if ( has_post_thumbnail() ) { ?>
24 <div class="pk-post-inner">
25 <div class="entry-thumbnail">
26 <div class="pk-overlay pk-overlay-ratio pk-ratio-landscape">
27 <div class="pk-overlay-background">
28 <a href="<?php the_permalink(); ?>" class="pk-overlay-link">
29 <?php the_post_thumbnail( $settings['image_size'] ); ?>
30 </a>
31 </div>
32 </div>
33 </div>
34 </div>
35 <?php } ?>
36
37 <div class="pk-post-inner">
38 <header>
39 <?php
40 if ( function_exists( 'csco_get_post_meta' ) ) {
41 csco_get_post_meta( array( 'category' ), false, true, array( 'category' ) );
42 }
43
44 // Post Title.
45 switch ( $settings['template'] ) {
46 case 'list':
47 $tag = 'h3';
48 break;
49 case 'grid-2':
50 $tag = 'h3';
51 break;
52 default:
53 $tag = 'h5';
54 break;
55 }
56
57 $tag = apply_filters( 'powerkit_widget_inline_posts_title_tag', $tag, $settings );
58
59 the_title( '<' . $tag . ' class="pk-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></' . $tag . '>' );
60
61 // Post Meta.
62 if ( function_exists( 'csco_get_post_meta' ) ) {
63 csco_get_post_meta( array( 'author', 'date' ), false, true, array( 'author', 'date' ) );
64 } else {
65 ?>
66 <div class="pk-post-meta">
67 <?php echo powerkit_get_meta_author(); // XSS. ?>
68 <span class="sep">·</span>
69 <?php echo powerkit_get_meta_date(); // XSS. ?>
70 </div>
71 <?php
72 }
73 ?>
74 </header><!-- .entry-header -->
75 </div><!-- .post-inner -->
76
77 </div><!-- .post-outer -->
78 </article>
79 <?php
80 }
81