WordPress plugin intelligence profile

Tweets Widget

Tweets Widget compatible with the new Twitter API 1.1

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.5
Current version1.0
WordPress coverageTested up to WordPress 4.5
Minimum stackWP 3.5.1 · PHP —
Directory statusactive
Last directory update29 Aug 201610y ago
Active installations10Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Tweets Widget version 1.0 as active, updated 10y ago and tested up to WordPress 4.5.

Overview

About this plugin

Use anonymous Loklak API OR Connect your Twitter account to this plugin and the widget will display your latest tweets on your site.

1 and provides full OAuth authentication via the WordPress admin area.

Shortcodes

You can embed tweets in the body of your posts using a WordPress the shortcode [tweets].

To specify a different user’s timeline add the user attribute.

g:

[tweets max=10 user=KhoslaSopan]<h3>Theming</h3>

For starters you can alter some of the HTML using built-in WordPress features.

See Widget Filters

and Widgetizing Themes

CSS

This plugin contains no default CSS. That’s deliberate, so you can style it how you want.

Tweets are rendered as a list which has various hooks you can use. Here’s a rough template:

tweet-details { /* style datetime and link under tweet */ }

Custom HTML

If you want to override the default markup of the tweets, the following filters are also available:

  • Add a header between the widget title and the tweets with tweets_render_before
  • Perform your own rendering of the timestamp with tweets_render_date
  • Render plain tweet text to your own HTML with tweets_render_text
  • Render each composite tweet with tweets_render_tweet
  • Override the unordered list for tweets with tweets_render_list
  • Add a footer before the end of the widget with tweets_render_after

php file:

add_filter('tweets_render_date', function( $created_at ){ $date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at ); return $date->format('d M h:ia'); }, 10, 1 );

add_filter('tweets_render_text', function( $text ){ return $text; // <- will use default }, 10, 1 );

'</a></p>'; }, 10, 4 );

com/me">More from me</a></footer>'; }, 10, 0 );<h3>Caching</h3>

Responses from the Twitter API are cached for 5 minutes by default. This means your new Tweets will not appear on your site in real time.

This is deliberate not only for performance, but also to avoid Twitter’s strict rate limits of 15 requests every 15 minutes.

You can override the 300 second cache by using the tweets_cache_seconds filter in your theme as follows:

This would extend the cache to 1 minute, which is the lowest value you should consider using on a live site:

add_filter('tweets_cache_seconds', function( $ttl ){ return 60; }, 10, 1 );

This would disable the cache (not recommended other than for debugging):

add_filter('tweets_cache_seconds', function( $ttl ){ return 0; }, 10, 1 );<h3>Emoji</h3>

g:

add_filter('tweets_emoji_callback', function( $func ){ return ''; } );

-

g:

add_filter(‘tweets_emoji_callback’, function( $func ){

return function( array $match ){

return ‘ ‘;

};

} );

Credits

org/blog

-

Portuguese translations by Leandro Dimitrio

  • German translations by Florian Felsing and David Noh
  • Russian translations by Andrey Yakovenko
  • Dutch translations by Daniel Wichers
  • Spanish translations by Pedro Pica

Notes

Be aware of Twitter’s display requirements when rendering tweets on your website.

0 and won’t work on older systems.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • loklak api
  • oauth
  • tweets
  • twitter
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.5
Minimum requirementsWordPress 3.5.1 · PHP not listed
Update activity29 Aug 201610y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.