# powerkit/2.3.3/modules/posts/helpers/helper-powerkit-posts.php

Powerkit – Supercharge your WordPress Site, version 2.3.3. 26 lines.

- Page: https://pluginprobe.com/plugins/powerkit/2.3.3/code/modules/posts/helpers/helper-powerkit-posts.php
- Raw: https://pluginprobe.com/plugins/powerkit/2.3.3/raw/modules/posts/helpers/helper-powerkit-posts.php
- Modified: 2020-08-17T07:35:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/powerkit/2.3.3/code/modules/posts/helpers/helper-powerkit-posts.php#L10-L20`.

```php
<?php
/**
 * Helpers Posts
 *
 * @package    Powerkit
 * @subpackage Modules/Helper
 */

/**
 * Widget template handler
 *
 * @param string $name     Specific template.
 * @param array  $posts    Array of posts.
 * @param array  $params   Array of params.
 * @param array  $instance Widget instance.
 */
function powerkit_widget_featured_posts_handler( $name, $posts, $params, $instance ) {
	$templates = apply_filters( 'powerkit_featured_posts_templates', array() );

	if ( isset( $templates[ $name ] ) && function_exists( $templates[ $name ]['func'] ) ) {
		call_user_func( $templates[ $name ]['func'], $posts, $params, $instance );
	} else {
		call_user_func( 'powerkit_widget_featured_posts_template', $posts, $params, $instance );
	}
}

```
