| 1 |
<?php |
| 2 |
/** |
| 3 |
* Contributors block template |
| 4 |
* |
| 5 |
* @var $attributes - block attributes |
| 6 |
* @var $options - layout options |
| 7 |
* |
| 8 |
* @link https://codesupply.co |
| 9 |
* @since 1.0.0 |
| 10 |
* |
| 11 |
* @package PowerKit |
| 12 |
* @subpackage PowerKit/templates |
| 13 |
*/ |
| 14 |
|
| 15 |
$params = array( |
| 16 |
'title' => '', |
| 17 |
'filter_ids' => implode( ',', (array) $attributes['contributors'] ), |
| 18 |
'avatar' => $attributes['showAvatar'], |
| 19 |
'social_accounts' => $attributes['showSocialAccounts'], |
| 20 |
'bio' => $attributes['showBio'], |
| 21 |
'recent_posts' => $attributes['showRecentPosts'], |
| 22 |
'recent_posts_count' => isset( $attributes['countRecentPosts'] ) ? $attributes['countRecentPosts'] : 0, |
| 23 |
); |
| 24 |
|
| 25 |
echo '<div class="' . esc_attr( $attributes['className'] ) . '" ' . ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ) . '>'; |
| 26 |
|
| 27 |
// Title. |
| 28 |
if ( $params['title'] ) { |
| 29 |
$params['title'] = '<h5 class="pk-contributors-title">' . $params['title'] . '<h5>'; |
| 30 |
} |
| 31 |
|
| 32 |
$args = array( |
| 33 |
'before_title' => '', |
| 34 |
'after_title' => '', |
| 35 |
'before_widget' => '', |
| 36 |
'after_widget' => '', |
| 37 |
); |
| 38 |
|
| 39 |
powerkit_contributors_get_html( $params, $args ); |
| 40 |
|
| 41 |
echo '</div>'; |
| 42 |
|