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 / posts / helpers / helper-powerkit-posts.php

helper-powerkit-posts.php in Powerkit – Supercharge your WordPress Site 3.1.1, at modules/posts/helpers/helper-powerkit-posts.php

31 lines 813 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Helpers Posts
4 *
5 * @package Powerkit
6 * @subpackage Modules/Helper
7 */
8
9 // Exit if accessed directly.
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 /**
15 * Widget template handler
16 *
17 * @param string $name Specific template.
18 * @param array $posts Array of posts.
19 * @param array $params Array of params.
20 * @param array $instance Widget instance.
21 */
22 function powerkit_widget_featured_posts_handler( $name, $posts, $params, $instance ) {
23 $templates = apply_filters( 'powerkit_featured_posts_templates', array() );
24
25 if ( isset( $templates[ $name ] ) && function_exists( $templates[ $name ]['func'] ) ) {
26 call_user_func( $templates[ $name ]['func'], $posts, $params, $instance );
27 } else {
28 call_user_func( 'powerkit_widget_featured_posts_template', $posts, $params, $instance );
29 }
30 }
31