Better Click To Tweet - Version 2.0.2

Version Description

  • fixed bug introduced in 2.0 related to javascript.
Download this release

Release Info

Developer ben.meredith@gmail.com
Plugin Icon 128x128 Better Click To Tweet
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0 to 2.0.2

assets/css/styles.css CHANGED
@@ -29,6 +29,7 @@
29
  text-decoration: none !important;
30
  text-transform: none !important;
31
  word-wrap:break-word;
 
32
  }
33
  .bctt-ctt-text a:hover {
34
  text-decoration: none;
29
  text-decoration: none !important;
30
  text-transform: none !important;
31
  word-wrap:break-word;
32
+ border-bottom: none !important;
33
  }
34
  .bctt-ctt-text a:hover {
35
  text-decoration: none;
bctt_options.php CHANGED
@@ -29,7 +29,7 @@ function bctt_tinymce_register_button($buttons) {
29
  }
30
 
31
  function bctt_tinymce_register_plugin($plugin_array) {
32
- $plugin_array['better_click_to_tweet'] = plugins_url( '/assets/js/bctt_clicktotweet_plugin.js', __FILE__);
33
  return $plugin_array;
34
  }
35
 
29
  }
30
 
31
  function bctt_tinymce_register_plugin($plugin_array) {
32
+ $plugin_array['bctt_clicktotweet'] = plugins_url( '/assets/js/bctt_clicktotweet_plugin.js', __FILE__);
33
  return $plugin_array;
34
  }
35
 
better-click-to-tweet.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /*
3
  Plugin Name: Better Click To Tweet
4
- Description: Add click to tweet boxes to your WordPress posts, easily. This is a new, fully renovated version of the late "Click to Tweet" plugin by Todaymade. I overhauled the plugin using the shortcode API, and (perhaps most importantly) removed the "powered by" link.
5
- Version: 2.0
6
  Author: Ben Meredith
7
  Author URI: http://benandjacq.com
8
  Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -37,14 +37,16 @@ function bctt_shortcode( $atts, $content ) {
37
  $handle_code = $handle;
38
  }
39
  extract( shortcode_atts( array(
40
- 'tweet' => '$content',
41
- 'handle' => '$handle_code'
42
  ), $atts ) );
43
  $text = $tweet;
44
  $bcttBttn = sprintf( __( 'Click To Tweet', 'better-click-to-tweet' ) );
45
  $short = bctt_shorten( $text, ( 117 - mb_strlen( $handle ) ) );
46
- return "<div class='bctt-click-to-tweet'><span class='bctt-ctt-text'><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".get_permalink()."' target='_blank'>".$short."</a></span><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".get_permalink()."' target='_blank' class='bctt-ctt-btn'>".$bcttBttn."</a></div>";
47
- }
 
 
 
48
 
49
  add_shortcode('bctt', 'bctt_shortcode');
50
 
1
  <?php
2
  /*
3
  Plugin Name: Better Click To Tweet
4
+ Description: The only Click To Tweet plugin to add translation support. The only Click To Tweet plugin to take into account your Twitter username's length in truncating long tweets, or to correctly take into account non-Roman characters. Simply put, as Click To Tweet plugins go, this one is, well, BETTER.
5
+ Version: 2.0.2
6
  Author: Ben Meredith
7
  Author URI: http://benandjacq.com
8
  Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
37
  $handle_code = $handle;
38
  }
39
  extract( shortcode_atts( array(
40
+ 'tweet' => '$content'
 
41
  ), $atts ) );
42
  $text = $tweet;
43
  $bcttBttn = sprintf( __( 'Click To Tweet', 'better-click-to-tweet' ) );
44
  $short = bctt_shorten( $text, ( 117 - mb_strlen( $handle ) ) );
45
+ if ( !is_feed() ) {
46
+ return "<div class='bctt-click-to-tweet'><span class='bctt-ctt-text'><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".get_permalink()."' target='_blank'>".$short."</a></span><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".get_permalink()."' target='_blank' class='bctt-ctt-btn'>".$bcttBttn."</a></div>";} else {
47
+ return "<hr /><p><em>".$short."</em><br /><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".get_permalink()."' target='_blank' class='bctt-ctt-btn'>".$bcttBttn."</a><br /><hr />";
48
+ };
49
+ }
50
 
51
  add_shortcode('bctt', 'bctt_shortcode');
52
 
readme.txt CHANGED
@@ -4,14 +4,16 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: click to tweet, twitter, tweet, twitter plugin, Twitter boxes, share, social media, post, posts, plugin, auto post
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
- Stable tag: 2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Correctly counts characters, taking into account username length and non-Roman characters. Simply put: as Click to Tweet plugins go, this one's BETTER. Also: translation ready, as of version 2.0!
12
 
13
  == Description ==
14
 
 
 
15
  This plugin allows you to easily create tweetable content for your readers. Using a simple shortcode, your selected text is highlighted and made tweetable.
16
  ><strong> Why Better?</strong><br>
17
  >This plugin started as a complete retool of the "Click To Tweet" plugin by Todaymade. There are a number of improvements under the hood, namely correct character counting when dealing with non-Roman characters, providing multi-language support, and use of the official shortcode API (which means security and forward-compatibility)
@@ -72,9 +74,13 @@ I want to maximize the usefulness of this plugin by translating it into multiple
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 2.0.1 =
76
  * added in support for RSS feeds: when outputting to an RSS feed, the click-to-tweet text will be smartly formatted.
77
  * added css declarations to deal with issues in the Twenty Fifteen theme.
 
78
 
79
  = 2.0 =
80
  * Major version release for internationalization: added Spanish (ES) translation, and updated code throughout for internationalization. Still to-do: add translation support for the tinymce plugin on the visual editor.
4
  Tags: click to tweet, twitter, tweet, twitter plugin, Twitter boxes, share, social media, post, posts, plugin, auto post
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
+ Stable tag: 2.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Insert click to tweet boxes into your posts, simply and securely. This plugin is regularly updated, translation-ready, and secure.
12
 
13
  == Description ==
14
 
15
+ = The Best Click To Tweet Plugin on the Market, FREE! =
16
+
17
  This plugin allows you to easily create tweetable content for your readers. Using a simple shortcode, your selected text is highlighted and made tweetable.
18
  ><strong> Why Better?</strong><br>
19
  >This plugin started as a complete retool of the "Click To Tweet" plugin by Todaymade. There are a number of improvements under the hood, namely correct character counting when dealing with non-Roman characters, providing multi-language support, and use of the official shortcode API (which means security and forward-compatibility)
74
 
75
  == Changelog ==
76
 
77
+ = 2.0.2 =
78
+ * fixed bug introduced in 2.0 related to javascript.
79
+
80
  = 2.0.1 =
81
  * added in support for RSS feeds: when outputting to an RSS feed, the click-to-tweet text will be smartly formatted.
82
  * added css declarations to deal with issues in the Twenty Fifteen theme.
83
+ * readme enhancements for better user experience.
84
 
85
  = 2.0 =
86
  * Major version release for internationalization: added Spanish (ES) translation, and updated code throughout for internationalization. Still to-do: add translation support for the tinymce plugin on the visual editor.