PluginProbe
Powerkit – Supercharge your WordPress Site / 3.1.1
Powerkit – Supercharge your WordPress Site v3.1.1
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 3.1.1, at modules/inline-posts/public/inline-posts-template.php

86 lines 2.1 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 // Exit if accessed directly.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Default Template
19 *
20 * @param array $posts Array of posts.
21 * @param array $settings Array of settings.
22 */
23 function powerkit_inline_posts_default_template( $posts, $settings ) {
24 ?>
25 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
26 <div class="pk-post-outer">
27
28 <?php if ( has_post_thumbnail() ) { ?>
29 <div class="pk-post-inner">
30 <div class="entry-thumbnail">
31 <div class="pk-overlay pk-overlay-ratio pk-ratio-landscape">
32 <div class="pk-overlay-background">
33 <a href="<?php the_permalink(); ?>" class="pk-overlay-link">
34 <?php the_post_thumbnail( $settings['image_size'] ); ?>
35 </a>
36 </div>
37 </div>
38 </div>
39 </div>
40 <?php } ?>
41
42 <div class="pk-post-inner">
43 <header>
44 <?php
45 if ( function_exists( 'csco_get_post_meta' ) ) {
46 csco_get_post_meta( array( 'category' ), false, true, array( 'category' ) );
47 }
48
49 // Post Title.
50 switch ( $settings['template'] ) {
51 case 'list':
52 $tag = 'h3';
53 break;
54 case 'grid-2':
55 $tag = 'h3';
56 break;
57 default:
58 $tag = 'h5';
59 break;
60 }
61
62 $tag = apply_filters( 'powerkit_widget_inline_posts_title_tag', $tag, $settings );
63
64 the_title( '<' . $tag . ' class="pk-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></' . $tag . '>' );
65
66 // Post Meta.
67 if ( function_exists( 'csco_get_post_meta' ) ) {
68 csco_get_post_meta( array( 'author', 'date' ), false, true, array( 'author', 'date' ) );
69 } else {
70 ?>
71 <div class="pk-post-meta">
72 <?php echo wp_kses_post( powerkit_get_meta_author() ); ?>
73 <span class="sep">·</span>
74 <?php echo wp_kses_post( powerkit_get_meta_date() ); ?>
75 </div>
76 <?php
77 }
78 ?>
79 </header><!-- .entry-header -->
80 </div><!-- .post-inner -->
81
82 </div><!-- .post-outer -->
83 </article>
84 <?php
85 }
86