| 1 |
<?php |
| 2 |
/** |
| 3 |
* Twitter 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' => esc_html__( 'Twitter Feed', 'powerkit' ), |
| 17 |
'number' => $attributes['number'], |
| 18 |
'header' => $attributes['showHeader'], |
| 19 |
'button' => $attributes['showFollowButton'], |
| 20 |
'template' => 'default', |
| 21 |
'is_block' => true, |
| 22 |
'block_attrs' => $attributes, |
| 23 |
); |
| 24 |
|
| 25 |
echo '<div class="' . esc_attr( $attributes['className'] ) . '" ' . ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ) . '>'; |
| 26 |
|
| 27 |
// Twitter output. |
| 28 |
powerkit_twitter_get_recent( $params ); |
| 29 |
|
| 30 |
echo '</div>'; |
| 31 |
|