Better Click To Tweet - Version 4.1

Version Description

  • the plugin now looks for a custom css stylesheet before falling back to the default style, giving designers and developers full access to the CSS, without disrupting user experience for folks just looking to plug and play.
  • added Finnish (fi) translation courtesy of Sampsa Daavitsainen at http://calltoaction.fi
Download this release

Release Info

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

Code changes from version 4.0 to 4.1

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: 4.0
6
  Author: Ben Meredith
7
  Author URI: http://benandjacq.com
8
  Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -170,19 +170,37 @@ function bctt_shortcode( $atts ) {
170
  add_shortcode('bctt', 'bctt_shortcode');
171
 
172
  /*
173
- * Load the stylesheet to style the output
 
 
 
 
174
  *
175
  * @since 0.1
176
  *
177
  */
178
 
179
  function bctt_scripts () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
- wp_register_style( 'bcct_style', plugins_url( 'assets/css/styles.css', __FILE__ ), false, '1.0', 'all' );
182
-
183
- wp_enqueue_style('bcct_style');
184
-
185
- };
186
 
187
  add_action('wp_enqueue_scripts', 'bctt_scripts');
188
 
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: 4.1
6
  Author: Ben Meredith
7
  Author URI: http://benandjacq.com
8
  Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
170
  add_shortcode('bctt', 'bctt_shortcode');
171
 
172
  /*
173
+ * Load the stylesheet to style the output.
174
+ *
175
+ * As of v4.1, defaults to a custom stylesheet
176
+ * located in the root of the uploads folder at wp-content/uploads/bcttstyle.css and falls
177
+ * back to the stylesheet bundled with the plugin if the custom sheet is not present.
178
  *
179
  * @since 0.1
180
  *
181
  */
182
 
183
  function bctt_scripts () {
184
+
185
+ $dir = wp_upload_dir();
186
+
187
+ $custom = file_exists( $dir['basedir'] . '/bcttstyle.css');
188
+
189
+ if( $custom != 'true' ) {
190
+
191
+ wp_register_style( 'bcct_style', plugins_url( 'assets/css/styles.css', __FILE__ ), false, '1.0', 'all' );
192
+
193
+ wp_enqueue_style('bcct_style');
194
+
195
+ } else {
196
+
197
+ wp_register_style( 'bcct_custom_style', $dir['baseurl'] . '/bcttstyle.css', false, '1.0', 'all' );
198
+
199
+ wp_enqueue_style('bcct_custom_style');
200
+ }
201
+
202
 
203
+ };
 
 
 
 
204
 
205
  add_action('wp_enqueue_scripts', 'bctt_scripts');
206
 
languages/better-click-to-tweet-fi.mo ADDED
Binary file
languages/better-click-to-tweet-fi.po ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 4.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/better-click-to-tweet\n"
7
+ "POT-Creation-Date: 2015-03-27 20:56:20+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-04-13 13:49+0200\n"
12
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: Call To Action Oy <sampsa@cta.fi>\n"
15
+ "Language: fi\n"
16
+ "X-Generator: Poedit 1.7.5\n"
17
+
18
+ #: bctt_options.php:40
19
+ msgid "You do not have sufficient permissions to access this page."
20
+ msgstr "Sinulla ei ole tarvittavia oikeuksia tälle sivulle."
21
+
22
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
23
+ #. it
24
+ #: bctt_options.php:45
25
+ msgid "Better Click To Tweet — a plugin by Ben Meredith"
26
+ msgstr "Better Click To Tweet - Lisäosan tekijä: Ben Meredith"
27
+
28
+ #: bctt_options.php:53
29
+ msgid "About the Author"
30
+ msgstr "Lisätietoa tekijästä"
31
+
32
+ #: bctt_options.php:57
33
+ msgid ""
34
+ "This plugin is developed by <a href=\"%s\">Ben Meredith</a>. I am a freelance "
35
+ "developer specializing in <a href=\"%s\">outrunning and outsmarting hackers</a>."
36
+ msgstr ""
37
+ "Tämän lisäosan on kehittänyt <a href=\"%s\">Ben Meredith</a>. Olen freelancer "
38
+ "kehittäjä joka on erikoistunut olemaan<a href=\"%s\">nopeampi ja älykkäämpi kuin "
39
+ "hakkerit</a>."
40
+
41
+ #: bctt_options.php:58
42
+ msgid "Sign up to receive my FREE web strategy guide"
43
+ msgstr "Tilaa tästä ILMAINEN verkkostrategiaoppaani"
44
+
45
+ #: bctt_options.php:59
46
+ msgctxt "placeholder text for input field"
47
+ msgid "Your Email Address"
48
+ msgstr "Sähköpostiosoitteesi"
49
+
50
+ #: bctt_options.php:60
51
+ msgid "No Spam. One-click unsubscribe in every message"
52
+ msgstr "Ei Spammia. Voit lopettaa tilauksen yhdellä hiiren klikkauksella"
53
+
54
+ #: bctt_options.php:74
55
+ msgid ""
56
+ "Are you a developer? I would love your help making this plugin better. Check out the "
57
+ "<a href=%s>plugin on Github.</a>"
58
+ msgstr ""
59
+ "Oletko kehittäjä? Olisi hienoa jos voisit ottaa osaa tämän lisäosan "
60
+ "jatkokehitykseen. Käy katsomassa lisäosan tiedot <a href=%s>GitHub:sta.</a>"
61
+
62
+ #: bctt_options.php:75
63
+ msgid "The best way you can support this and other plugins is to <a href=%s>donate</a>"
64
+ msgstr ""
65
+ "Paras tapa osoittaa kiitollisuutta tälle ja muille lisäosille on <a href="
66
+ "%s>lahjoittaa</a>"
67
+
68
+ #: bctt_options.php:75
69
+ msgid "The second best way is to <a href=%s>leave an honest review.</a>"
70
+ msgstr "Toiseksi paras tapa on <a href=%s>jättää rehellinen arvostelu</a>"
71
+
72
+ #: bctt_options.php:76
73
+ msgid "Did this plugin save you enough time to be worth some money?"
74
+ msgstr "Auttoiko tämä lisäosa säästämään tarpeeksi aikaa lahjoittaaksesi?"
75
+
76
+ #: bctt_options.php:77
77
+ msgid "Click here to buy me a Coke to say thanks."
78
+ msgstr "Klikkaa tästä tarjotaksesi minulle kokiksen kiitokseksi."
79
+
80
+ #: bctt_options.php:87
81
+ msgid "Instructions"
82
+ msgstr "Ohjeet"
83
+
84
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
85
+ #. it
86
+ #: bctt_options.php:88
87
+ msgid ""
88
+ "To add styled click-to-tweet quote boxes include the Better Click To Tweet shortcode "
89
+ "in your post."
90
+ msgstr ""
91
+ "Lisätäksesi click-to-tweet lainauslaatikon sisällytä Click To Tweet lyhytkoodi "
92
+ "tekstiisi."
93
+
94
+ #: bctt_options.php:89
95
+ msgid "Here's how you format the shortcode:"
96
+ msgstr "Näin muokaat lyhytkoodia:"
97
+
98
+ #. translators: This text shows up as a sample tweet in the instructions for
99
+ #. how to use the plugin.
100
+ #: bctt_options.php:89
101
+ msgid "Meaningful, tweetable quote."
102
+ msgstr "Tärkeä, twiitin arvoinen lainaus tekstistäsi"
103
+
104
+ #. translators: Also, treat "BCTT" as a brand name, don't translate it
105
+ #: bctt_options.php:90
106
+ msgid ""
107
+ "If you are using the visual editor, click the BCTT birdie in the toolbar to add a "
108
+ "pre-formatted shortcode to your post."
109
+ msgstr ""
110
+ "Jos käytät visuaalista tekstieditoria, klikkaa BCTT-lintua työkalurivillä "
111
+ "lisätäksesi valmiiksi muotoillun lyhtykoodin tekstiisi."
112
+
113
+ #: bctt_options.php:91
114
+ msgid ""
115
+ "Tweet length is automatically shortened to 117 characters minus the length of your "
116
+ "twitter name, to leave room for it and a link back to the post."
117
+ msgstr ""
118
+ "Twiitti on automaattisesti lyhennetty 117 merkkiin miinus Twitter-tunnuksesi pituus. "
119
+ "Tämä jättää tilaa Twitter tunnuksellesi kuten myös linkille takaisin tekstiisi."
120
+
121
+ #: bctt_options.php:96
122
+ msgid "Settings"
123
+ msgstr "Asetukset"
124
+
125
+ #: bctt_options.php:97
126
+ msgid ""
127
+ "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not include "
128
+ "the @ symbol."
129
+ msgstr ""
130
+ "Syötä Twitter-tunnuksesi lisätäksesi \"via @sinuntunnuksesi\" twiittiisi. Älä lisää "
131
+ "@ merkkiä."
132
+
133
+ #: bctt_options.php:98
134
+ msgid ""
135
+ "Checking the box below will force the plugin to show the WordPress shortlink in "
136
+ "place of the full URL. While this does not impact tweet character length, it is "
137
+ "useful alongside plugins which customize the WordPress shortlink using services like "
138
+ "bit.ly or yourls.org for tracking"
139
+ msgstr ""
140
+ "Allaolevan laatikon merkkaamalla lisäosa pakottaa twiittiin lyhytlinkin kokonaisen "
141
+ "URL:n sijasta. Vaikka tämä ei vaikuta merkkimäärään, on se käytännölinen ominaisuus "
142
+ "sellaisten lisäosien kanssa, jotka käyttävät palveluja kuten bit.ly tai yourls.org "
143
+ "analytiikkaan"
144
+
145
+ #: bctt_options.php:104
146
+ msgctxt "label for text input on settings screen"
147
+ msgid "Your Twitter Handle"
148
+ msgstr "Twitter-tunnuksesi"
149
+
150
+ #: bctt_options.php:107
151
+ msgctxt "label for checkbox on settings screen"
152
+ msgid "Use Short URL?"
153
+ msgstr "Käytä lyhyttä URL-osoitetta?"
154
+
155
+ #: bctt_options.php:112
156
+ msgid "Save Changes"
157
+ msgstr "Tallenna muutokset"
158
+
159
+ #: bctt_options.php:114
160
+ msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
161
+ msgstr "Avoimen lähdekoodin lisäosa. Tekijä: <a href=%s>Ben Meredith</a>"
162
+
163
+ #: better-click-to-tweet.php:138
164
+ msgctxt "Text for the box on the reader-facing box"
165
+ msgid "Click To Tweet"
166
+ msgstr "Klikkaa ja Twiittaa"
167
+
168
+ #: better-click-to-tweet.php:209
169
+ msgctxt "text for the link on the plugins page"
170
+ msgid "Settings"
171
+ msgstr "Asetukset"
172
+
173
+ #. Plugin Name of the plugin/theme
174
+ msgid "Better Click To Tweet"
175
+ msgstr "Parempi Klikkaa ja Twiittaa"
176
+
177
+ #. Description of the plugin/theme
178
+ msgid ""
179
+ "The only Click To Tweet plugin to add translation support. The only Click To Tweet "
180
+ "plugin to take into account your Twitter username's length in truncating long "
181
+ "tweets, or to correctly take into account non-Roman characters. Simply put, as Click "
182
+ "To Tweet plugins go, this one is, well, BETTER."
183
+ msgstr ""
184
+ "Ainoa Klikkaa ja Twiittaa-lisäosa joka tarjoaa käännöksen tuen. Ainoa Klikkaa ja "
185
+ "Twiittaa-lisäosa joka ottaa huomioon sinun Twitter-tunnuksesi pituuden pitkien "
186
+ "twiittien katkaisussa, sekä ainoa lisäosa joka ottaa huomioon ei-roomalaiset merkit. "
187
+ "Yksinkertaisesti Klikkaa ja Twiittaa-lisäosat huomioiden, PAREMPI."
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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, bitly, bit.ly, yourls, yourls.org, translation-ready
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
- Stable tag: 4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -15,21 +15,25 @@ Insert click to tweet boxes into your posts, simply and securely. This plugin is
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)
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
 
25
- Also, developers, please hop in and suggest improvements. You can submit pull requests at the [github repo](https://github.com/Benunc/better-click-to-tweet "plugin github repo") for this plugin, or go through the official svn repo here. I'm also actively seeking translators to bring the usefulness of this plugin to non-English speakers. Please message me in the forums.
26
 
27
  Huge thanks to Andrew Norcross @norcross for the help with making the plugin even better as of v4.0 with enhancements to the Visual Editor's button. But you can't blame him for any of the other code!
28
 
29
  Translators:
30
 
31
  * Español (es_ES): Jordi Rosalez
32
- * Serbian (sr_RS): [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
 
33
 
34
  == Installation ==
35
 
@@ -103,6 +107,10 @@ I want to maximize the usefulness of this plugin by translating it into multiple
103
 
104
  == Changelog ==
105
 
 
 
 
 
106
  = 4.0 =
107
  * complete overhaul of the visual editor button courtesy @norcross
108
  * added the ability to make all links "nofollow" by adding the parameter `nofollow="yes"` to the shortcode.
@@ -169,6 +177,10 @@ I want to maximize the usefulness of this plugin by translating it into multiple
169
 
170
  == Upgrade Notice ==
171
 
 
 
 
 
172
  = 4.0 =
173
  * complete overhaul of the visual editor button courtesy @norcross
174
  * added the ability to make all links "nofollow" by adding the parameter `nofollow="yes"` to the shortcode.
@@ -203,5 +215,3 @@ I want to maximize the usefulness of this plugin by translating it into multiple
203
 
204
  = 2.0 =
205
  * Adds internationalization, and out of the box support for Spanish (ES) language.
206
-
207
-
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, translation-ready
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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
 
19
+ * Now [fully customizable](http://benlikes.us/bcttcustom "power user guide customization instructions") if you know CSS.
20
+ * Easily [remove the "via"](http://benlikes.us/7m "how to customize the better click to tweet plugin")
21
+ * Selectively [remove the URL](http://benlikes.us/7r "power user guide") from the resulting Tweet
22
+ * For the SEO-conscious: [make links nofollow.](http://benlikes.us/7r "power user guide")
23
+
24
+ ><strong> Why Better?</strong><br>
25
+ >This plugin started as a complete retool of the "Click To Tweet" plugin by Todaymade. In addition to the user-focused changes above, the under-the-hood changes include correct character counting when dealing with non-Roman characters, translation-readiness, and use of the official shortcode API (which means security and forward-compatibility)
26
 
 
27
 
28
+ **Speaking of the area under the hood:** developers, please hop in and suggest improvements. You can submit pull requests at the [github repo](https://github.com/Benunc/better-click-to-tweet "plugin github repo") for this plugin. I'm also actively seeking translators to bring the usefulness of this plugin to non-English speakers. Please message me in the forums.
29
 
30
  Huge thanks to Andrew Norcross @norcross for the help with making the plugin even better as of v4.0 with enhancements to the Visual Editor's button. But you can't blame him for any of the other code!
31
 
32
  Translators:
33
 
34
  * Español (es_ES): Jordi Rosalez
35
+ * Serbian (sr_RS): [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
36
+ * Finnish/Suomi (fi): [Sampsa Daavitsainen](http://www.calltoaction.fi/ "CallToAction.fi")
37
 
38
  == Installation ==
39
 
107
 
108
  == Changelog ==
109
 
110
+ = 4.1 =
111
+ * the plugin now looks for a custom css stylesheet before falling back to the default style, giving designers and developers full access to the CSS, without disrupting user experience for folks just looking to plug and play.
112
+ * added Finnish (fi) translation courtesy of Sampsa Daavitsainen at http://calltoaction.fi
113
+
114
  = 4.0 =
115
  * complete overhaul of the visual editor button courtesy @norcross
116
  * added the ability to make all links "nofollow" by adding the parameter `nofollow="yes"` to the shortcode.
177
 
178
  == Upgrade Notice ==
179
 
180
+ = 4.1 =
181
+ * added full customizability (instructions forthcoming at http://benlikes.us/7r )
182
+ * added Finnish translation.
183
+
184
  = 4.0 =
185
  * complete overhaul of the visual editor button courtesy @norcross
186
  * added the ability to make all links "nofollow" by adding the parameter `nofollow="yes"` to the shortcode.
215
 
216
  = 2.0 =
217
  * Adds internationalization, and out of the box support for Spanish (ES) language.