Better Click To Tweet - Version 5.2.1

Version Description

  • fix unused $handle_code variable has been removed. Was causing some errors for folks.
  • fix code introduced in 5.2 messed up the "via" option and the option to not include the URL. This has been fixed.
Download this release

Release Info

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

Code changes from version 5.2 to 5.2.1

Files changed (2) hide show
  1. better-click-to-tweet.php +7 -8
  2. readme.txt +5 -1
better-click-to-tweet.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: Better Click To Tweet
4
Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
- Version: 5.2
6
Author: Ben Meredith
7
Author URI: https://www.wpsteward.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -114,19 +114,18 @@ function bctt_shortcode( $atts ) {
114
}
115
116
if ( ! empty( $handle ) && $atts['via'] != 'no' ) {
117
-
118
$via = $handle;
119
$related = $handle;
120
} else {
121
122
- $via = '';
123
$related = '';
124
125
}
126
127
if ( $atts['via'] != 'yes' ) {
128
-
129
- $handle_code = '';
130
$handle_length = 0;
131
132
}
@@ -151,7 +150,7 @@ function bctt_shortcode( $atts ) {
151
152
} else {
153
154
- $bcttURL = '';
155
156
}
157
@@ -192,10 +191,10 @@ function bctt_shortcode( $atts ) {
192
$output = "<span class='" . esc_attr( $bctt_span_class ) . "'><span class='" . esc_attr( $bctt_text_span_class ) . "'><a href='" . esc_url( $href ) . "' target='_blank'" . $rel . ">" . esc_html( $short ) . " </a></span><a href='" . esc_url( $href ) . "' target='_blank' class='" . esc_attr( $bctt_button_span_class ) . "'" . $rel . ">" . esc_html( $atts['prompt'] ) . "</a></span>";
193
} else {
194
195
- $output = "<hr /><p><em>" . esc_html( $short ) . "</em><br /><a href='" . esc_url( $href ) . "' target='_blank' class='bctt-ctt-btn' " . $rel . " >" . esc_html( $atts['prompt'] ) . "</a><br /><hr />";
196
197
}
198
- return apply_filters( 'bctt_output', $output, $short, $bctt_button_span_class, $bctt_span_class, $bctt_text_span_class, $bcttURL, $handle_code, $rel, $atts );
199
}
200
201
add_shortcode( 'bctt', 'bctt_shortcode' );
2
/*
3
Plugin Name: Better Click To Tweet
4
Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
+ Version: 5.2.1
6
Author: Ben Meredith
7
Author URI: https://www.wpsteward.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
114
}
115
116
if ( ! empty( $handle ) && $atts['via'] != 'no' ) {
117
+
118
$via = $handle;
119
$related = $handle;
120
} else {
121
122
+ $via = null;
123
$related = '';
124
125
}
126
127
if ( $atts['via'] != 'yes' ) {
128
+ $via = null;
129
$handle_length = 0;
130
131
}
150
151
} else {
152
153
+ $bcttURL = null;
154
155
}
156
191
$output = "<span class='" . esc_attr( $bctt_span_class ) . "'><span class='" . esc_attr( $bctt_text_span_class ) . "'><a href='" . esc_url( $href ) . "' target='_blank'" . $rel . ">" . esc_html( $short ) . " </a></span><a href='" . esc_url( $href ) . "' target='_blank' class='" . esc_attr( $bctt_button_span_class ) . "'" . $rel . ">" . esc_html( $atts['prompt'] ) . "</a></span>";
192
} else {
193
194
+ $output = "<hr /><p><em>" . esc_html( $short ) . "</em><br /><a href='" . esc_url( $href ) . "' target='_blank' " . $rel . " >" . esc_html( $atts['prompt'] ) . "</a><br /><hr />";
195
196
}
197
+ return apply_filters( 'bctt_output', $output, $short, $bctt_button_span_class, $bctt_span_class, $bctt_text_span_class, $href, $rel, $atts );
198
}
199
200
add_shortcode( 'bctt', 'bctt_shortcode' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.wpsteward.com/donations/plugin-support/
4
Tags: click to tweet, twitter, tweet,
5
Requires at least: 3.8
6
Tested up to: 4.8
7
- Stable tag: 5.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -101,6 +101,10 @@ Donations: http://benlikes.us/donate
101
102
== Changelog ==
103
104
= 5.2 =
105
* security fix — adds (more) escaping throughout the plugin. Thanks to Paul de Wouters from HumanMade for the PR!
106
* enhancement — tested for compatibility with WordPress core 4.8
4
Tags: click to tweet, twitter, tweet,
5
Requires at least: 3.8
6
Tested up to: 4.8
7
+ Stable tag: 5.2.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
101
102
== Changelog ==
103
104
+ = 5.2.1 =
105
+ * fix — unused $handle_code variable has been removed. Was causing some errors for folks.
106
+ * fix — code introduced in 5.2 messed up the "via" option and the option to not include the URL. This has been fixed.
107
+
108
= 5.2 =
109
* security fix — adds (more) escaping throughout the plugin. Thanks to Paul de Wouters from HumanMade for the PR!
110
* enhancement — tested for compatibility with WordPress core 4.8