Skip to content


Repository files navigation

WDS Twitter Widget

A widget that lets you show a user's latest tweets. Built with developers in mind and has many filters throughout.

There is a function for disabling the Twitter App credential fields in the widget. This is handy if you don't want consumer_key, consumer_secret, access_token, and access_token_secret visibile to users of the WordPress dashboard, and allows you to keep it in version control.

To disable:

wds_twwi_disable_widget_app_settings( array(
	'consumer_key'        => 'YOUR CONSUMER KEY',
	'consumer_secret'     => 'YOUR CONSUMER SECRET',
	'access_token'        => 'YOUR ACCESS TOKEN',
	'access_token_secret' => 'YOUR ACCESS TOKEN SECRET',
) );

// Also works if you want to secure your keys through obscurity
// wds_twwi_disable_widget_app_settings( '0=CONSUMER_KEY&1=CONSUMER_SECRET&2=ACCESS_TOKEN&3=ACCESS_TOKEN_SECRET' );

If there's an error with your app credentials, the error will be displayed in the WordPress dashboard.

Example usage if wanting to disable widget:


  1. Recursively clone this repo (git clone --recursive, or download this zip.
  2. Upload the entire /wds-twitter-widget directory to the /wp-content/plugins/ directory.
  3. Activate WDS Twitter Widget through the 'Plugins' menu in WordPress.

Plugin Details


  • Replace esc_url with esc_url_raw so query parameter values are not converted.
  • New filter, wds_twitter_fetch_tweets for overriding the retrieval of tweets.
  • Refactor plugin so that methods for getting tweets are publicly accessible (so the widget can be bypassed)
  • Additional filters for manipulating data
  • Function to disable widget (if using methods programmatically)
  • First release