Skip to content

yurivictor/tweetable-text

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tweetable-text

A WordPress plugin that lets you choose specific phrases or sentences for one-click tweeting.

Based on Tweetable Text by Salim Virani, with additions by Joshua Benton of Nieman Lab.

Lets you highlight specific parts of a WordPress post for one-click tweeting. Use:

Schardt says that [tweetable]finding creative journalists with an awareness of what technologies are available to them is half the battle.[/tweetable] The advancements themselves outpace the average newsroom's awareness and ability, but funding continues to be overwhelmingly aimed at furthering these platforms — while journalists struggle to keep up.

Optionally, you can include an alt tag in the shortcode if you want the text of the tweet to be different than the exact text you're highlighting:

Schardt says that [tweetable alt="This is actually the text that will show up in the tweet."]finding creative journalists with an awareness of what technologies are available to them is half the battle.[/tweetable] The advancements themselves outpace the average newsroom's awareness and ability, but funding continues to be overwhelmingly aimed at furthering these platforms — while journalists struggle to keep up.

You can also add hashtags to the tweet:

Schardt says that [tweetable hashtag="#journalism #publicmedia"]finding creative journalists with an awareness of what technologies are available to them is half the battle.[/tweetable] The advancements themselves outpace the average newsroom's awareness and ability, but funding continues to be overwhelmingly aimed at furthering these platforms — while journalists struggle to keep up.

Or add an @username to use as the "via" source of the tweet:

Schardt says that [tweetable via="aschweig"]finding creative journalists with an awareness of what technologies are available to them is half the battle.[/tweetable] The advancements themselves outpace the average newsroom's awareness and ability, but funding continues to be overwhelmingly aimed at furthering these platforms — while journalists struggle to keep up.

Customize

Settings page

alt tag

You can customize the colors, the link text, the background of the link and the hover state to match your web sites.

You can also add your Twitter handle so tweets show up via you.

Templates

Parent and child themes can include templates for the outputted HTML, inline CSS, or settings page by including tweet.php, css.php, or options.php inside a tweetable/ directory. See the defaults in this plugin's templates/ directory for available variables.

The default outputted HTML includes a Twitter bird from Font Awesome. If you want to use your own version of Font Awesome, the tweetable_font_awesome_src filter is available. If you don't want to use Font Awesome, remove it with wp_dequeue_style() or add_filter( 'tweetable_font_awesome_src', '__return_false' ).

Allowed Post Types

The shortcode works with Posts by default. You can whitelist more post types with the tweetable_allowed_post_types filter.

Bugs

  • Improve bit.ly shortening for links (check for valid API credentials on options page save)

Improvements

  • Tweetable button
  • Tweetable settings

Todo

  • Submit pull request to jbenton

About

A WordPress plugin that lets you choose specific phrases or sentences for one-click tweeting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 92.8%
  • PHP 7.1%
  • JavaScript 0.1%