Better Click To Tweet - Version 3.0

Version Description

  • added option to use WordPress shortlink in place of full URL.
  • further refinement of the math used in calculating tweet truncation length.
Download this release

Release Info

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

Code changes from version 2.0.3 to 3.0

bctt_options.php CHANGED
@@ -35,18 +35,26 @@ function bctt_tinymce_register_plugin($plugin_array) {
35
36
37
function bctt_admin_menu() {
38
- add_action('admin_init', 'bctt_register_settings');
39
add_options_page('Better Click To Tweet Options', 'Better Click To Tweet', 'manage_options', 'better-click-to-tweet', 'bctt_settings_page');
40
}
41
42
function bctt_register_settings() {
43
register_setting('bctt_clicktotweet-options', 'bctt-twitter-handle', 'bctt_validate_settings');
44
}
45
46
function bctt_validate_settings($input) {
47
return str_replace('@', '', strip_tags(stripslashes($input)));
48
}
49
50
function bctt_settings_page() {
51
if ( !current_user_can( 'manage_options' ) ) {
52
wp_die( __( 'You do not have sufficient permissions to access this page.', 'bctt-lang' ) );
@@ -70,6 +78,7 @@ function bctt_settings_page() {
70
<h2><?php _e( 'Settings', 'better-click-to-tweet' ); ?></h2>
71
72
<p><?php _e( 'Enter your Twitter handle to add "via @yourhandle" to your tweets. Do not include the @ symbol.', 'better-click-to-tweet' ); ?></p>
73
<form method="post" action="options.php" style="display: inline-block;">
74
<?php settings_fields( 'bctt_clicktotweet-options' ); ?>
75
@@ -77,8 +86,11 @@ function bctt_settings_page() {
77
<tr valign="top">
78
<th style="width: 200px;"><label><?php _e('Your Twitter Handle', 'better-click-to-tweet'); ?></label></th>
79
<td><input type="text" name="bctt-twitter-handle" value="<?php echo get_option('bctt-twitter-handle'); ?>" /></td>
80
- </tr>
81
- <tr>
82
<td></td>
83
<td><?php submit_button(); ?></td>
84
</table>
35
36
37
function bctt_admin_menu() {
38
+ add_action('admin_init', 'bctt_register_settings', 100, 1 );
39
add_options_page('Better Click To Tweet Options', 'Better Click To Tweet', 'manage_options', 'better-click-to-tweet', 'bctt_settings_page');
40
}
41
42
function bctt_register_settings() {
43
register_setting('bctt_clicktotweet-options', 'bctt-twitter-handle', 'bctt_validate_settings');
44
+ register_setting('bctt_clicktotweet-options', 'bctt-short-url', 'bctt_validate_checkbox' );
45
}
46
47
function bctt_validate_settings($input) {
48
return str_replace('@', '', strip_tags(stripslashes($input)));
49
}
50
51
+ function bctt_validate_checkbox( $input) {
52
+ if ( ! isset( $input ) || $input != '1' )
53
+ return 0;
54
+ else
55
+ return 1;
56
+ }
57
+
58
function bctt_settings_page() {
59
if ( !current_user_can( 'manage_options' ) ) {
60
wp_die( __( 'You do not have sufficient permissions to access this page.', 'bctt-lang' ) );
78
<h2><?php _e( 'Settings', 'better-click-to-tweet' ); ?></h2>
79
80
<p><?php _e( 'Enter your Twitter handle to add "via @yourhandle" to your tweets. Do not include the @ symbol.', 'better-click-to-tweet' ); ?></p>
81
+ <p><?php _e('Checking the box below will force the plugin to show the WordPress shortlink in place of the full URL. While this does not impact tweet character length, it is useful alongside plugins which customize the WordPress shortlink using services like bit.ly or yourls.org for tracking', 'better-click-to-tweet')?> </p>
82
<form method="post" action="options.php" style="display: inline-block;">
83
<?php settings_fields( 'bctt_clicktotweet-options' ); ?>
84
86
<tr valign="top">
87
<th style="width: 200px;"><label><?php _e('Your Twitter Handle', 'better-click-to-tweet'); ?></label></th>
88
<td><input type="text" name="bctt-twitter-handle" value="<?php echo get_option('bctt-twitter-handle'); ?>" /></td>
89
+ </tr><tr valign="top">
90
+ <th style="width: 200px;"><label><?php _e('Use Short URL?', 'better-click-to-tweet'); ?></label></th><td><input type="checkbox" name="bctt-short-url" value="1" <?php if ( 1 == get_option( 'bctt-short-url') ) echo 'checked="checked"'; ?>" /></td>
91
+ </tr>
92
+ <tr>
93
+
94
<td></td>
95
<td><?php submit_button(); ?></td>
96
</table>
better-click-to-tweet.php CHANGED
@@ -2,7 +2,7 @@
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.3
6
Author: Ben Meredith
7
Author URI: http://benandjacq.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -36,15 +36,21 @@ function bctt_shortcode( $atts, $content ) {
36
} else {
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
@@ -62,12 +68,14 @@ function bctt_scripts () {
62
add_action('wp_enqueue_scripts', 'bctt_scripts');
63
64
/*
65
- * Delete options on uninstall
66
*/
67
68
function bctt_on_uninstall(){
69
70
delete_option( 'bctt-twitter-handle' );
71
72
};
73
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: 3.0
6
Author: Ben Meredith
7
Author URI: http://benandjacq.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
36
} else {
37
$handle_code = $handle;
38
}
39
+ extract( shortcode_atts( array(
40
'tweet' => '$content'
41
), $atts ) );
42
$text = $tweet;
43
+ if ( get_option('bctt-short-url') != false ) {
44
+ $bcttURL = wp_get_shortlink();
45
+ }
46
+ else {
47
+ $bcttURL = get_permalink();
48
+ }
49
$bcttBttn = sprintf( __( 'Click To Tweet', 'better-click-to-tweet' ) );
50
+ $short = bctt_shorten( $text, ( 117 - (6 + mb_strlen( $handle ) ) ) );
51
if ( !is_feed() ) {
52
+ 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=".$bcttURL."' target='_blank'>".$short."</a></span><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".$bcttURL."' target='_blank' class='bctt-ctt-btn'>".$bcttBttn."</a></div>";} else {
53
+ return "<hr /><p><em>".$short."</em><br /><a href='https://twitter.com/intent/tweet?text=".urlencode($short).$handle_code."&url=".$bcttURL."' target='_blank' class='bctt-ctt-btn'>".$bcttBttn."</a><br /><hr />";
54
};
55
}
56
68
add_action('wp_enqueue_scripts', 'bctt_scripts');
69
70
/*
71
+ * Delete options and shortcode on uninstall
72
*/
73
74
function bctt_on_uninstall(){
75
76
delete_option( 'bctt-twitter-handle' );
77
+ delete_option( 'bctt-short-url');
78
+ remove_shortcode( 'bctt' );
79
80
};
81
languages/better-click-to-tweet-es_ES.mo CHANGED
Binary file
languages/better-click-to-tweet-es_ES.po CHANGED
@@ -1,8 +1,8 @@
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Better Click To Tweet\n"
4
- "POT-Creation-Date: 2014-12-17 10:04-0500\n"
5
- "PO-Revision-Date: 2014-12-17 10:38-0500\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: es_ES\n"
@@ -18,16 +18,16 @@ msgstr ""
18
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
"X-Poedit-SearchPath-0: .\n"
20
21
- #: bctt_options.php:52
22
msgid "You do not have sufficient permissions to access this page."
23
msgstr "Usted no tiene los permisos necesarios para acceder a esta página."
24
25
- #: bctt_options.php:62
26
msgid "Instructions"
27
msgstr "Instrucciones"
28
29
#. translators: Treat "Better Click To Tweet" as a brand name, don't translate it
30
- #: bctt_options.php:64
31
msgid ""
32
"To add styled click-to-tweet quote boxes include the Better Click To Tweet "
33
"shortcode in your post."
@@ -35,17 +35,17 @@ msgstr ""
35
"Para añadir casillas de texto de estilo \"click to tweet\" incluya el "
36
"shortcode \"Better Click To Tweet\" en su mensaje."
37
38
- #: bctt_options.php:65
39
msgid "Here's how you format the shortcode:"
40
msgstr "Aquí está cómo formatear el shortcode:"
41
42
#. translators: This text shows up as a sample tweet in the instructions for how to use the plugin.
43
- #: bctt_options.php:65
44
msgid "Meaningful, tweetable quote."
45
msgstr "Algo significativo para Twittear."
46
47
#. translators: Also, treat "BCTT" as a brand name, don't translate it
48
- #: bctt_options.php:66
49
msgid ""
50
"If you are using the visual editor, click the BCTT birdie in the toolbar to "
51
"add a pre-formatted shortcode to your post."
@@ -54,7 +54,7 @@ msgstr ""
54
"barra de herramientas para añadir un shortcode formateado previamente a su "
55
"mensaje."
56
57
- #: bctt_options.php:67
58
msgid ""
59
"Tweet length is automatically shortened to 117 characters minus the length "
60
"of your twitter name, to leave room for it and a link back to the post."
@@ -63,11 +63,11 @@ msgstr ""
63
"longitud de su nombre de Twitter, para dejar espacio para ella y un enlace "
64
"de vuelta al tweet."
65
66
- #: bctt_options.php:70 better-click-to-tweet.php:75
67
msgid "Settings"
68
msgstr "Ajustes"
69
70
- #: bctt_options.php:72
71
msgid ""
72
"Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
73
"include the @ symbol."
@@ -75,16 +75,32 @@ msgstr ""
75
"Ingrese su nombre identificador de Twitter para agregar \"via "
76
"@nombreIdentificador\" a sus tweets. No incluya el símbolo @."
77
78
- #: bctt_options.php:78
79
msgid "Your Twitter Handle"
80
msgstr "Su Identificador de Twitter"
81
82
- #: bctt_options.php:88
83
#, php-format
84
msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
85
msgstr "Un plugin de código abierto por <a href=%s>Ben Meredith</a>"
86
87
- #: bctt_options.php:89
88
#, php-format
89
msgid ""
90
"Are you a developer? I would love your help making this plugin better. Check "
@@ -93,7 +109,7 @@ msgstr ""
93
"¿Eres desarrollador? Me encantaría su ayuda para hacer mejor este plugin. "
94
"Echa un vistazo al <a href=%s>plugin en Github.</a>"
95
96
- #: bctt_options.php:90
97
#, php-format
98
msgid ""
99
"The best way you can support this and other plugins is to <a href=%s>donate</"
@@ -102,19 +118,19 @@ msgstr ""
102
"La mejor manera en que usted puede apoyar este y otros plugins es <a href="
103
"%s>donar</a>"
104
105
- #: bctt_options.php:90
106
#, php-format
107
msgid "The second best way is to <a href=%s>leave an honest review.</a>"
108
msgstr "La segunda mejor manera es <a href=%s>dejar una revisión honesta.</a>"
109
110
- #: bctt_options.php:91
111
msgid "Did this plugin save you enough time to be worth some money?"
112
msgstr "¿Este plugin le ahorra suficiente tiempo para valer algo de dinero?"
113
114
- #: bctt_options.php:92
115
msgid "Click here to buy me a Coke to say thanks."
116
msgstr "Haga clic aquí y compre una Coca-Cola para decir gracias."
117
118
- #: better-click-to-tweet.php:44
119
msgid "Click To Tweet"
120
msgstr "Click Para Twittear"
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Better Click To Tweet\n"
4
+ "POT-Creation-Date: 2015-01-12 14:27-0500\n"
5
+ "PO-Revision-Date: 2015-01-12 14:41-0500\n"
6
"Last-Translator: \n"
7
"Language-Team: \n"
8
"Language: es_ES\n"
18
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
"X-Poedit-SearchPath-0: .\n"
20
21
+ #: bctt_options.php:60
22
msgid "You do not have sufficient permissions to access this page."
23
msgstr "Usted no tiene los permisos necesarios para acceder a esta página."
24
25
+ #: bctt_options.php:70
26
msgid "Instructions"
27
msgstr "Instrucciones"
28
29
#. translators: Treat "Better Click To Tweet" as a brand name, don't translate it
30
+ #: bctt_options.php:72
31
msgid ""
32
"To add styled click-to-tweet quote boxes include the Better Click To Tweet "
33
"shortcode in your post."
35
"Para añadir casillas de texto de estilo \"click to tweet\" incluya el "
36
"shortcode \"Better Click To Tweet\" en su mensaje."
37
38
+ #: bctt_options.php:73
39
msgid "Here's how you format the shortcode:"
40
msgstr "Aquí está cómo formatear el shortcode:"
41
42
#. translators: This text shows up as a sample tweet in the instructions for how to use the plugin.
43
+ #: bctt_options.php:73
44
msgid "Meaningful, tweetable quote."
45
msgstr "Algo significativo para Twittear."
46
47
#. translators: Also, treat "BCTT" as a brand name, don't translate it
48
+ #: bctt_options.php:74
49
msgid ""
50
"If you are using the visual editor, click the BCTT birdie in the toolbar to "
51
"add a pre-formatted shortcode to your post."
54
"barra de herramientas para añadir un shortcode formateado previamente a su "
55
"mensaje."
56
57
+ #: bctt_options.php:75
58
msgid ""
59
"Tweet length is automatically shortened to 117 characters minus the length "
60
"of your twitter name, to leave room for it and a link back to the post."
63
"longitud de su nombre de Twitter, para dejar espacio para ella y un enlace "
64
"de vuelta al tweet."
65
66
+ #: bctt_options.php:78 better-click-to-tweet.php:83
67
msgid "Settings"
68
msgstr "Ajustes"
69
70
+ #: bctt_options.php:80
71
msgid ""
72
"Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
73
"include the @ symbol."
75
"Ingrese su nombre identificador de Twitter para agregar \"via "
76
"@nombreIdentificador\" a sus tweets. No incluya el símbolo @."
77
78
+ #: bctt_options.php:81
79
+ msgid ""
80
+ "Checking the box below will force the plugin to show the WordPress shortlink "
81
+ "in place of the full URL. While this does not impact tweet character length, "
82
+ "it is useful alongside plugins that customize the WordPress shortlink using "
83
+ "services like bit.ly or yourls.org for tracking"
84
+ msgstr ""
85
+ "Marca la casilla siguiente para mostrar la shortlink WordPress en lugar de "
86
+ "la dirección URL completa. Mientras que esto no afecte la longitud de tweet, "
87
+ "es útil junto con plugins que personalizar el shortlink WordPress usando "
88
+ "servicios como bit.ly o yourls.org para el seguimiento"
89
+
90
+ #: bctt_options.php:87
91
msgid "Your Twitter Handle"
92
msgstr "Su Identificador de Twitter"
93
94
+ #: bctt_options.php:90
95
+ msgid "Use Short URL?"
96
+ msgstr "¿Usa URL corta?"
97
+
98
+ #: bctt_options.php:100
99
#, php-format
100
msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
101
msgstr "Un plugin de código abierto por <a href=%s>Ben Meredith</a>"
102
103
+ #: bctt_options.php:101
104
#, php-format
105
msgid ""
106
"Are you a developer? I would love your help making this plugin better. Check "
109
"¿Eres desarrollador? Me encantaría su ayuda para hacer mejor este plugin. "
110
"Echa un vistazo al <a href=%s>plugin en Github.</a>"
111
112
+ #: bctt_options.php:102
113
#, php-format
114
msgid ""
115
"The best way you can support this and other plugins is to <a href=%s>donate</"
118
"La mejor manera en que usted puede apoyar este y otros plugins es <a href="
119
"%s>donar</a>"
120
121
+ #: bctt_options.php:102
122
#, php-format
123
msgid "The second best way is to <a href=%s>leave an honest review.</a>"
124
msgstr "La segunda mejor manera es <a href=%s>dejar una revisión honesta.</a>"
125
126
+ #: bctt_options.php:103
127
msgid "Did this plugin save you enough time to be worth some money?"
128
msgstr "¿Este plugin le ahorra suficiente tiempo para valer algo de dinero?"
129
130
+ #: bctt_options.php:104
131
msgid "Click here to buy me a Coke to say thanks."
132
msgstr "Haga clic aquí y compre una Coca-Cola para decir gracias."
133
134
+ #: better-click-to-tweet.php:49
135
msgid "Click To Tweet"
136
msgstr "Click Para Twittear"
languages/better-click-to-tweet.pot ADDED
@@ -0,0 +1,135 @@
1
+ # Copyright (C) 2015 Better Click To Tweet
2
+ # This file is distributed under the same license as the Better Click To Tweet package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Better Click To Tweet 3.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/better-click-to-tweet\n"
7
+ "POT-Creation-Date: 2015-01-15 17:21:50+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: bctt_options.php:60
16
+ msgid "You do not have sufficient permissions to access this page."
17
+ msgstr ""
18
+
19
+ #: bctt_options.php:70
20
+ msgid "Instructions"
21
+ msgstr ""
22
+
23
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
24
+ #. it
25
+ #: bctt_options.php:72
26
+ msgid ""
27
+ "To add styled click-to-tweet quote boxes include the Better Click To Tweet "
28
+ "shortcode in your post."
29
+ msgstr ""
30
+
31
+ #: bctt_options.php:73
32
+ msgid "Here's how you format the shortcode:"
33
+ msgstr ""
34
+
35
+ #. translators: This text shows up as a sample tweet in the instructions for
36
+ #. how to use the plugin.
37
+ #: bctt_options.php:73
38
+ msgid "Meaningful, tweetable quote."
39
+ msgstr ""
40
+
41
+ #. translators: Also, treat "BCTT" as a brand name, don't translate it
42
+ #: bctt_options.php:74
43
+ msgid ""
44
+ "If you are using the visual editor, click the BCTT birdie in the toolbar to "
45
+ "add a pre-formatted shortcode to your post."
46
+ msgstr ""
47
+
48
+ #: bctt_options.php:75
49
+ msgid ""
50
+ "Tweet length is automatically shortened to 117 characters minus the length "
51
+ "of your twitter name, to leave room for it and a link back to the post."
52
+ msgstr ""
53
+
54
+ #: bctt_options.php:78 better-click-to-tweet.php:85
55
+ msgid "Settings"
56
+ msgstr ""
57
+
58
+ #: bctt_options.php:80
59
+ msgid ""
60
+ "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
61
+ "include the @ symbol."
62
+ msgstr ""
63
+
64
+ #: bctt_options.php:81
65
+ msgid ""
66
+ "Checking the box below will force the plugin to show the WordPress shortlink "
67
+ "in place of the full URL. While this does not impact tweet character length, "
68
+ "it is useful alongside plugins which customize the WordPress shortlink using "
69
+ "services like bit.ly or yourls.org for tracking"
70
+ msgstr ""
71
+
72
+ #: bctt_options.php:87
73
+ msgid "Your Twitter Handle"
74
+ msgstr ""
75
+
76
+ #: bctt_options.php:90
77
+ msgid "Use Short URL?"
78
+ msgstr ""
79
+
80
+ #: bctt_options.php:100
81
+ msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
82
+ msgstr ""
83
+
84
+ #: bctt_options.php:101
85
+ msgid ""
86
+ "Are you a developer? I would love your help making this plugin better. Check "
87
+ "out the <a href=%s>plugin on Github.</a>"
88
+ msgstr ""
89
+
90
+ #: bctt_options.php:102
91
+ msgid ""
92
+ "The best way you can support this and other plugins is to <a href=%s>donate</"
93
+ "a>"
94
+ msgstr ""
95
+
96
+ #: bctt_options.php:102
97
+ msgid "The second best way is to <a href=%s>leave an honest review.</a>"
98
+ msgstr ""
99
+
100
+ #: bctt_options.php:103
101
+ msgid "Did this plugin save you enough time to be worth some money?"
102
+ msgstr ""
103
+
104
+ #: bctt_options.php:104
105
+ msgid "Click here to buy me a Coke to say thanks."
106
+ msgstr ""
107
+
108
+ #: better-click-to-tweet.php:49
109
+ msgid "Click To Tweet"
110
+ msgstr ""
111
+
112
+ #. Plugin Name of the plugin/theme
113
+ msgid "Better Click To Tweet"
114
+ msgstr ""
115
+
116
+ #. Plugin URI of the plugin/theme
117
+ msgid "https://wordpress.org/plugins/better-click-to-tweet/"
118
+ msgstr ""
119
+
120
+ #. Description of the plugin/theme
121
+ msgid ""
122
+ "The only Click To Tweet plugin to add translation support. The only Click To "
123
+ "Tweet plugin to take into account your Twitter username's length in "
124
+ "truncating long tweets, or to correctly take into account non-Roman "
125
+ "characters. Simply put, as Click To Tweet plugins go, this one is, well, "
126
+ "BETTER."
127
+ msgstr ""
128
+
129
+ #. Author of the plugin/theme
130
+ msgid "Ben Meredith"
131
+ msgstr ""
132
+
133
+ #. Author URI of the plugin/theme
134
+ msgid "http://benandjacq.com"
135
+ msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
=== Better Click To Tweet ===
2
Contributors: ben.meredith@gmail.com
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ
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.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -18,7 +18,7 @@ This plugin allows you to easily create tweetable content for your readers. Usin
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)
20
21
- I am working on a tutorial to switch to my plugin from any other similar plugin in a way that doesn't mean you have to switch every shortcode or pseudo-shortcode by hand. Stay tuned!
22
23
Don't be scared to donate, if this plugin makes your blogging life any better.
24
@@ -52,6 +52,27 @@ Then, wherever you want to insert a Click to Tweet quote, use a shortcode in the
52
53
In the visual editor, you can click the blue birdy icon in the toolbar and a correctly formatted shortcode will be inserted in your text. For more info or clarifications, start a [support thread](https://wordpress.org/support/plugin/better-click-to-tweet "support forum"). I'll actively answer.
54
55
= What do I do if it's not working right? =
56
I am active in [the support forums](https://wordpress.org/support/plugin/better-click-to-tweet "Better CTT Support"), and in patching the plugin. Start a thread there, and I will gladly help you out. Most of the time you can expect a few hours before a response. I'm in the eastern US, and I like playing with my kids at night, so you might not hear back immediately. Don't panic.
57
@@ -74,6 +95,10 @@ I want to maximize the usefulness of this plugin by translating it into multiple
74
75
== Changelog ==
76
77
= 2.0.3 =
78
* updated CSS to remove underline on "Click to Tweet" on Twenty Fifteen theme (and others!)
79
1
=== Better Click To Tweet ===
2
Contributors: ben.meredith@gmail.com
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ
4
+ Tags: click to tweet, twitter, tweet, twitter plugin, Twitter boxes, share, social media, post, posts, plugin, auto post, bitly, bit.ly, yourls, yourls.org
5
Requires at least: 3.8
6
Tested up to: 4.1
7
+ Stable tag: 3.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
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)
20
21
+ Version 3.0 adds an option to enable WordPress shortlinks instead of the full URL in the tweet. While this doesn't allow for any advantage in terms of number of characters, it does allow you to use this plugin in conjunction with a plugin like the [WP Bitly Plugin](https://wordpress.org/plugins/wp-bitly/ "WP Bit.ly") to track link clicks and status.
22
23
Don't be scared to donate, if this plugin makes your blogging life any better.
24
52
53
In the visual editor, you can click the blue birdy icon in the toolbar and a correctly formatted shortcode will be inserted in your text. For more info or clarifications, start a [support thread](https://wordpress.org/support/plugin/better-click-to-tweet "support forum"). I'll actively answer.
54
55
+ = How does the URL shortener functionality work? =
56
+ Better Click To Tweet gives you the maximum number of characters possible. Allow me to explain:
57
+
58
+ Twitter automatically routes every link through its own URL shortener (you might recognize t.co as the domain they use). For their t.co links, the length is automatically truncated to 23 characters for URLs. This leaves 117 characters after the URL for you to use to compose your tweet. Even a link that is run through bit.ly or a yourls.org install is still routed through t.co in the tweet.
59
+
60
+ The benefit of URL shorteners goes beyond just character length, though. Many users use bit.ly or a similar service to track numbers of clicks and other analytical data. I personally use yourls.org to power http://benlikes.us for my shortened links.
61
+
62
+ As of version 3.0, my plugin works alongside url shortening plugins to harness that power, if you choose to.
63
+
64
+ WordPress has a feature called "shortlinks" which changes the long URL to something like yourdomain.com/?p=3435. Various plugins in the official repository exist to change that shortlink to one using other outside services. Using a combination of those plugins and mine, your Better Click To Tweet boxes can now display a trackable link.
65
+
66
+ On the settings page for Better Click To Tweet, simply check the box indicating you'd like to use the short URL, and save changes. If you've got a plugin that correctly hijacks the built-in WordPress shortlink functionality, you're all set! I've tested my plugin with the following plugins, and will make every effort to keep this list updated:
67
+
68
+ * [WP Bitly](https://wordpress.org/plugins/wp-bitly/ "WP Bit.ly")
69
+ * [YOURLS Link Creator](https://wordpress.org/support/plugin/yourls-link-creator "YOURLS Link Creator")
70
+ * [Goo.gl](https://wordpress.org/plugins/googl/ "Goo.gl")
71
+
72
+ If you run into any issues with my plugin not working alongside a certain link shortener, start a [support thread](https://wordpress.org/support/plugin/better-click-to-tweet "support forum") and include a link to the other plugin. I'll see what I can do to work with the other developer.
73
+
74
+ I've also written a tutorial at http://benlikes.us/79 for how to set up the shortlinks with bit.ly and yourls.org.
75
+
76
= What do I do if it's not working right? =
77
I am active in [the support forums](https://wordpress.org/support/plugin/better-click-to-tweet "Better CTT Support"), and in patching the plugin. Start a thread there, and I will gladly help you out. Most of the time you can expect a few hours before a response. I'm in the eastern US, and I like playing with my kids at night, so you might not hear back immediately. Don't panic.
78
95
96
== Changelog ==
97
98
+ = 3.0 =
99
+ * added option to use WordPress shortlink in place of full URL.
100
+ * further refinement of the math used in calculating tweet truncation length.
101
+
102
= 2.0.3 =
103
* updated CSS to remove underline on "Click to Tweet" on Twenty Fifteen theme (and others!)
104