PluginProbe
Powerkit – Supercharge your WordPress Site / 2.4.4
Powerkit – Supercharge your WordPress Site v2.4.4
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 / twitter / public / block / render.php

render.php in Powerkit – Supercharge your WordPress Site 2.4.4, at modules/twitter/public/block/render.php

38 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 'username' => $attributes['username'],
18 'number' => $attributes['number'],
19 'header' => $attributes['showHeader'],
20 'button' => $attributes['showFollowButton'],
21 'replies' => $attributes['showReplies'],
22 'retweets' => $attributes['showRetweets'],
23 'template' => 'default',
24 'is_block' => true,
25 'block_attrs' => $attributes,
26 );
27
28 echo '<div class="' . esc_attr( $attributes['className'] ) . '" ' . ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ) . '>';
29
30 // Instagram output.
31 if ( $attributes['username'] ) {
32 powerkit_twitter_get_recent( $params, 'powerkit_twitter_block_cache' );
33 } else {
34 powerkit_alert_warning( 'Twitter data is not set, please check the User Name.' );
35 }
36
37 echo '</div>';
38