summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/twitter-timeline.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/twitter-timeline.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/jetpack/modules/shortcodes/twitter-timeline.php b/plugins/jetpack/modules/shortcodes/twitter-timeline.php
index 8931592b..4f12d067 100644
--- a/plugins/jetpack/modules/shortcodes/twitter-timeline.php
+++ b/plugins/jetpack/modules/shortcodes/twitter-timeline.php
@@ -11,7 +11,7 @@ function twitter_timeline_shortcode( $attr ) {
);
- $attr = shortcode_atts( $default_atts, $attr );
+ $attr = shortcode_atts( $default_atts, $attr, 'twitter-timeline' );
if ( $attr['username'] != preg_replace( '/[^A-Za-z0-9_]+/', '', $attr['username'] ) )
return '<!--' . __( 'Invalid username', 'jetpack' ) . '-->';
@@ -20,7 +20,7 @@ function twitter_timeline_shortcode( $attr ) {
return '<!--' . __( 'Invalid id', 'jetpack' ) . '-->';
$tweets_by = sprintf( __( 'Tweets by @%s', 'jetpack' ), $attr['username'] );
- $output = '<a class="twitter-timeline" width="' . (int)$attr['width'] . '" height="' . (int)$attr['width'] . '" href="' . esc_url( 'https://twitter.com/'. $attr['username'] ) . '" data-widget-id="' . (int)$attr['id'] . '">' . esc_html( $tweets_by ) . '</a>';
+ $output = '<a class="twitter-timeline" width="' . (int)$attr['width'] . '" height="' . (int)$attr['height'] . '" href="' . esc_url( 'https://twitter.com/'. $attr['username'] ) . '" data-widget-id="' . esc_attr( $attr['id'] ) . '">' . esc_html( $tweets_by ) . '</a>';
add_action( 'wp_footer', 'twitter_timeline_js' );
return $output;