Better Click To Tweet - Version 4.0

Version Description

  • complete overhaul of the visual editor button courtesy @norcross
  • added the ability to make all links "nofollow" by adding the parameter nofollow="yes" to the shortcode.
  • complete overhaul of the settings page for better readability.
Download this release

Release Info

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

Code changes from version 3.4.1 to 4.0

assets/js/bctt_clicktotweet_plugin.js DELETED
@@ -1,80 +0,0 @@
1
- (function() {
2
- tinymce.create('tinymce.plugins.bctt_clicktotweet', {
3
- init: function(ed, url) {
4
- ed.addButton('bctt_clicktotweet', {
5
- title: 'Add Tweetable Text',
6
- image: url.replace("/js", "") + '/img/birdy_button.png',
7
- onclick: function() {
8
- var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
9
- W = W - 10;
10
- tb_show( 'Better Click To Tweet Shortcode Generator', '#TB_inline?width=' + W + '&height=auto' + '&inlineId=bctt-form' );
11
- }
12
- });
13
- },
14
- createControl: function(n, cm) {
15
- return null;
16
- },
17
- getInfo: function() {
18
- return {
19
- longname: "Click To Tweet by BenUNC",
20
- author: 'Ben Meredith',
21
- authorurl: 'http://benandjacq.com/',
22
- infourl: 'http://benandjacq.com/better-click-to-tweet',
23
- version: "2.0"
24
- };
25
- }
26
- });
27
- tinymce.PluginManager.add('bctt_clicktotweet', tinymce.plugins.bctt_clicktotweet);
28
-
29
-
30
- jQuery(function(){
31
- // creates a form to be displayed everytime the button is clicked
32
- var form = jQuery('<div id="bctt-form"><table id="bctt-table" class="form-table">\
33
- <tr>\
34
- <th><label for="bctt-tweet">Tweetable Quote</label></th>\
35
- <td><p><textarea cols="70" id="bctt-tweet" name="tweet" /></p>\
36
- <small>Enter the Tweet. Text will be automatically truncated to provide space for the link back to the post and (optional) your Twitter user name. </small></td>\
37
- </tr>\
38
- <tr>\
39
- <th><label for="bctt-via">Include "via"?</label></th>\
40
- <td><p><input type="radio" name="viamark" id="via" value="yes" checked />Yes\
41
- <input type="radio" name="viamark" id="via" value="no" />No</br /></p>\
42
- <small>Do you wand to add \"via @YourTwitterName\" to this tweet?</small></td>\
43
- </tr>\
44
- </table>\
45
- <p class="submit">\
46
- <input type="button" id="bctt-submit" class="button-primary" value="Insert Tweet" name="submit" />\
47
- </p>\
48
- </div>');
49
-
50
- var table = form.find('table');
51
- form.appendTo('body').hide();
52
-
53
- // handles the click event of the submit button
54
- form.find('#bctt-submit').click(function(){
55
- // defines the options and their default values
56
-
57
- var shortcode = '[bctt';
58
-
59
- var value = table.find('#bctt-tweet').val();
60
-
61
- if ( value != '' ) {
62
- shortcode += ' tweet="' + value + '"';
63
- }
64
-
65
- var viaChoice = table.find('input[name="viamark"]:checked').val();
66
-
67
- if ( viaChoice == "no" ) {
68
- shortcode += ' via="no"';
69
- }
70
-
71
- shortcode += ']';
72
-
73
- // inserts the shortcode into the active editor
74
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
75
-
76
- // closes Thickbox
77
- tb_remove();
78
- });
79
- });
80
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/tinymce/bctt-tinymce.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file for use with the Better Click To Tweet Plugin. http://wordpress.org/plugins/better-click-to-tweet
4
+ * Huge thanks to Andrew Norcross @norcross for pretty much every bit of code you see here:
5
+ *
6
+ * @since 4.0
7
+ * @author Andrew Norcross
8
+ */
9
+
10
+ defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
11
+
12
+ if ( ! class_exists( 'BCTT_TinyMCE' ) ) {
13
+
14
+ // Start up the engine
15
+ class BCTT_TinyMCE {
16
+
17
+ /**
18
+ * This is our constructor
19
+ *
20
+ * @return BCTT_TinyMCE
21
+ */
22
+ public function __construct() {
23
+ add_action( 'admin_init', array( $this, 'tinymce_loader' ) );
24
+ add_action( 'admin_enqueue_scripts', array( $this, 'tinymce_css' ), 10 );
25
+ }
26
+
27
+ /**
28
+ * load our CSS file
29
+ * @return [type] [description]
30
+ */
31
+ public function tinymce_css() {
32
+
33
+ wp_enqueue_style( 'bctt-admin', plugins_url( '/css/bctt-admin.css', __FILE__ ), array(), null, 'all' );
34
+ }
35
+
36
+ /**
37
+ * load the TinyMCE button
38
+ *
39
+ * @return [type] [description]
40
+ */
41
+ public function tinymce_loader() {
42
+ add_filter( 'mce_external_plugins', array( __class__, 'bctt_tinymce_core' ) );
43
+ add_filter( 'mce_buttons', array( __class__, 'bctt_tinymce_buttons' ) );
44
+ }
45
+
46
+ /**
47
+ * loader for the required JS
48
+ *
49
+ * @param [type] $plugin_array [description]
50
+ * @return [type] [description]
51
+ */
52
+ public static function bctt_tinymce_core( $plugin_array ) {
53
+
54
+ // add our JS file
55
+ $plugin_array['bctt'] = plugins_url( '/js/tinymce-bctt.js', __FILE__ );
56
+
57
+ // return the array
58
+ return $plugin_array;
59
+ }
60
+
61
+ /**
62
+ * Add the button key for event link via JS
63
+ *
64
+ * @param [type] $buttons [description]
65
+ * @return [type] [description]
66
+ */
67
+ public static function bctt_tinymce_buttons( $buttons ) {
68
+
69
+ // set the 'kitchen sink' button as a variable for later
70
+ $sink = array_search( 'wp_adv', $buttons );
71
+
72
+ // remove the sink
73
+ if ( ! empty( $sink ) ) {
74
+ unset( $buttons[$sink] );
75
+ }
76
+
77
+ // push our buttons to the end
78
+ array_push( $buttons, 'bctt' );
79
+
80
+ // now add back the sink
81
+ if ( ! empty( $sink ) ) {
82
+ $buttons[] = 'wp_adv';
83
+ }
84
+
85
+ // send them back
86
+ return $buttons;
87
+ }
88
+
89
+ // end class
90
+ }
91
+
92
+ // end exists check
93
+ }
94
+
95
+ // Instantiate our class
96
+ new BCTT_TinyMCE();
assets/tinymce/css/bctt-admin.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .mce-i-bctt-tweet {
2
+ font-family: "dashicons";
3
+ }
4
+
5
+ .mce-i-bctt-tweet:before {
6
+ display: inline-block;
7
+ -webkit-font-smoothing: antialiased;
8
+ text-align: center;
9
+ font-weight: 400;
10
+ font-size: 20px;
11
+ line-height: 1;
12
+ font-family: "dashicons";
13
+ content: "\f301";
14
+ color: #4099ff;
15
+ speak: none;
16
+ vertical-align: top;
17
+ position: relative;
18
+ }
assets/tinymce/js/tinymce-bctt.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function() {
2
+ tinymce.PluginManager.add( 'bctt', function( editor, url ) {
3
+
4
+ // Add a button that opens a window
5
+ editor.addButton( 'bctt', {
6
+
7
+ text: '',
8
+ tooltip: 'Better Click To Tweet Shortcode Generator',
9
+ icon: 'bctt-tweet',
10
+ onclick: function() {
11
+ // Open window
12
+ editor.windowManager.open( {
13
+ title: 'Better Click To Tweet Shortcode Generator',
14
+ body: [
15
+ {
16
+ type: 'textbox',
17
+ name: 'tweet',
18
+ label: 'Tweetable Quote',
19
+ multiline : true,
20
+ minHeight : 60
21
+ },
22
+ {
23
+ type: 'checkbox',
24
+ checked: true,
25
+ name: 'viamark',
26
+ value: true,
27
+ text: 'Add \"via @YourTwitterName\" to this tweet',
28
+ label: 'Include "via"?',
29
+ }
30
+ ],
31
+ width: 500,
32
+ height: 120,
33
+ onsubmit: function( e ) {
34
+
35
+ // bail without tweet text
36
+ if ( e.data.tweet === '' ) {
37
+ return;
38
+ }
39
+
40
+ // build my content
41
+ var bcttBuild = '';
42
+
43
+ // set initial
44
+ bcttBuild += '[bctt tweet="' + e.data.tweet + '"';
45
+
46
+ // check for via
47
+ if ( e.data.viamark === false ) {
48
+ bcttBuild += ' via="no"';
49
+ }
50
+
51
+ // close it up
52
+ bcttBuild += ']';
53
+
54
+ // Insert content when the window form is submitted
55
+ editor.insertContent( bcttBuild );
56
+ }
57
+ });
58
+ }
59
+ });
60
+ });
61
+ })();
bctt_options.php CHANGED
@@ -5,33 +5,13 @@ defined('ABSPATH') or die("No script kiddies please!");
5
  // Cache bust tinymce
6
  add_filter('tiny_mce_version', 'refresh_mce');
7
 
 
 
 
8
  // Add Settings Link
9
  add_action('admin_menu', 'bctt_admin_menu');
10
 
11
- // Add settings link to plugins listing page
12
 
13
- // Add button plugin to TinyMCE
14
- add_action('init', 'bctt_tinymce_button');
15
-
16
- function bctt_tinymce_button() {
17
- if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
18
- return;
19
- }
20
-
21
- if ( get_user_option( 'rich_editing' ) == 'true' ) {
22
- add_filter( 'mce_external_plugins', 'bctt_tinymce_register_plugin' );
23
- add_filter( 'mce_buttons', 'bctt_tinymce_register_button' );
24
- }
25
- }
26
- function bctt_tinymce_register_button($buttons) {
27
- array_push($buttons, "|", "bctt_clicktotweet");
28
- return $buttons;
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
 
36
 
37
  function bctt_admin_menu() {
@@ -53,57 +33,94 @@ function bctt_validate_checkbox( $input) {
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' ) );
61
  } ?>
62
 
63
  <div class="wrap">
64
 
65
- <?php screen_icon(); ?>
66
- <h2>Better Click To Tweet</h2>
67
 
68
  <hr/>
69
-
70
- <h2><?php _e( 'Instructions', 'better-click-to-tweet'); ?></h2>
71
- <p>
72
- <?php /* translators: Treat "Better Click To Tweet" as a brand name, don't translate it */ _e('To add styled click-to-tweet quote boxes include the Better Click To Tweet shortcode in your post.', 'better-click-to-tweet' ); ?></p>
73
- <p><?php _e( 'Here\'s how you format the shortcode:', 'better-click-to-tweet' ); ?><pre>[bctt tweet="<?php /* translators: This text shows up as a sample tweet in the instructions for how to use the plugin. */ _e('Meaningful, tweetable quote.', 'better-click-to-tweet' ); ?>"]</pre></p>
74
- <p><?php /* translators: Also, treat "BCTT" as a brand name, don't translate it */ _e( 'If you are using the visual editor, click the BCTT birdie in the toolbar to add a pre-formatted shortcode to your post.', 'better-click-to-tweet' ); ?></p>
75
- <p><?php _e( 'Tweet length is automatically shortened to 117 characters minus the length of your twitter name, to leave room for it and a link back to the post.', 'better-click-to-tweet' ); ?>
76
- </p>
77
-
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
-
85
- <table class="form-table">
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>
97
- </form>
98
-
99
- <hr/>
100
- <em><?php $url = 'http://benandjacq.com'; $link = sprintf( __( 'An open source plugin by <a href=%s>Ben Meredith</a>', 'better-click-to-tweet'), esc_url($url) ); echo $link; ?></em>
101
- <p><?php $url2 = 'https://github.com/Benunc/better-click-to-tweet'; $link2 = sprintf( __( 'Are you a developer? I would love your help making this plugin better. Check out the <a href=%s>plugin on Github.</a>' , 'better-click-to-tweet'), esc_url($url2 ) ); echo $link2; ?></p>
102
- <p><?php $url3 = 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ'; $link3 = sprintf( __( 'The best way you can support this and other plugins is to <a href=%s>donate</a>', 'better-click-to-tweet' ), esc_url($url3) ); echo $link3; ?></a>. <?php $url4 = 'https://wordpress.org/support/view/plugin-reviews/better-click-to-tweet'; $link4 = sprintf( __( 'The second best way is to <a href=%s>leave an honest review.</a>', 'better-click-to-tweet'), esc_url($url4) ); echo $link4; ?></p>
103
- <p><?php _e( 'Did this plugin save you enough time to be worth some money?', 'better-click-to-tweet'); ?></p>
104
- <p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ" target="_blank"><?php _e( 'Click here to buy me a Coke to say thanks.', 'better-click-to-tweet' ); ?></a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  </div>
106
- <?php
107
  }
108
 
109
 
5
  // Cache bust tinymce
6
  add_filter('tiny_mce_version', 'refresh_mce');
7
 
8
+ // Add button to visual editor
9
+ include dirname(__FILE__).'/assets/tinymce/bctt-tinymce.php';
10
+
11
  // Add Settings Link
12
  add_action('admin_menu', 'bctt_admin_menu');
13
 
 
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
 
17
  function bctt_admin_menu() {
33
  return 0;
34
  else
35
  return 1;
36
+ }
37
 
38
  function bctt_settings_page() {
39
  if ( !current_user_can( 'manage_options' ) ) {
40
+ wp_die( __( 'You do not have sufficient permissions to access this page.', 'better-click-to-tweet' ) );
41
  } ?>
42
 
43
  <div class="wrap">
44
 
45
+ <h2><?php /* translators: Treat "Better Click To Tweet" as a brand name, don't translate it */ _e('Better Click To Tweet — a plugin by Ben Meredith', 'better-click-to-tweet');?></h2>
 
46
 
47
  <hr/>
48
+ <div id="bctt_admin" class="metabox-holder has-right-sidebar">
49
+ <div class="inner-sidebar">
50
+ <div id="normal-sortables" class="meta-box-sortables ui-sortable">
51
+ <div class="postbox">
52
+ <div class="inside">
53
+ <h3 class="hndle ui-sortable-handle"><?php _e('About the Author', 'better-click-to-tweet');?> </h3>
54
+ <div id="bctt_signup">
55
+ <form action="//benandjacq.us1.list-manage.com/subscribe/post?u=8f88921110b81f81744101f4d&amp;id=bd909b5f89" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
56
+ <div id="mc_embed_signup_scroll">
57
+ <p> <?php echo sprintf( __('This plugin is developed by <a href="%s">Ben Meredith</a>. I am a freelance developer specializing in <a href="%s">outrunning and outsmarting hackers</a>.', 'better-click-to-tweet'), esc_url('http://benandjacq.com'), esc_url('http://benandjacq.com/wordpress-maintenance-plans') );?></p>
58
+ <h4><?php _e('Sign up to receive my FREE web strategy guide', 'better-click-to-tweet'); ?></h4>
59
+ <p><input type="email" value="" name="EMAIL" class="widefat" id="mce-EMAIL" placeholder="<?php _ex('Your Email Address', 'placeholder text for input field', 'better-click-to-tweet');?>">
60
+ <small><?php _e('No Spam. One-click unsubscribe in every message', 'better-click-to-tweet'); ?></small></p>
61
+ <div style="position: absolute; left: -5000px;"><input type="text" name="b_8f88921110b81f81744101f4d_bd909b5f89" tabindex="-1" value="">
62
+ </div>
63
+ <p class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button-secondary"></p>
64
+
65
+ </div>
66
+ </form>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ <div class="meta-box-sortables">
72
+ <div class="postbox">
73
+ <div class="inside">
74
+ <p><?php $url2 = 'https://github.com/Benunc/better-click-to-tweet'; $link2 = sprintf( __( 'Are you a developer? I would love your help making this plugin better. Check out the <a href=%s>plugin on Github.</a>' , 'better-click-to-tweet'), esc_url($url2 ) ); echo $link2; ?></p>
75
+ <p><?php $url3 = 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ'; $link3 = sprintf( __( 'The best way you can support this and other plugins is to <a href=%s>donate</a>', 'better-click-to-tweet' ), esc_url($url3) ); echo $link3; ?></a>. <?php $url4 = 'https://wordpress.org/support/view/plugin-reviews/better-click-to-tweet'; $link4 = sprintf( __( 'The second best way is to <a href=%s>leave an honest review.</a>', 'better-click-to-tweet'), esc_url($url4) ); echo $link4; ?></p>
76
+ <p><?php _e( 'Did this plugin save you enough time to be worth some money?', 'better-click-to-tweet'); ?></p>
77
+ <p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HDSGWRJYFQQNJ" target="_blank"><?php _e( 'Click here to buy me a Coke to say thanks.', 'better-click-to-tweet' ); ?></a></p>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div id="post-body" class="has-sidebar">
83
+ <div id="post-body-content" class="has-sidebar-content">
84
+ <div id="normal-sortables" class="meta-box-sortables">
85
+ <div class="postbox">
86
+ <div class="inside">
87
+ <h2 class="hndle"><?php _e( 'Instructions', 'better-click-to-tweet'); ?></h2>
88
+ <p><?php /* translators: Treat "Better Click To Tweet" as a brand name, don't translate it */ _e('To add styled click-to-tweet quote boxes include the Better Click To Tweet shortcode in your post.', 'better-click-to-tweet' ); ?></p>
89
+ <p><?php _e( 'Here\'s how you format the shortcode:', 'better-click-to-tweet' ); ?><pre>[bctt tweet="<?php /* translators: This text shows up as a sample tweet in the instructions for how to use the plugin. */ _e('Meaningful, tweetable quote.', 'better-click-to-tweet' ); ?>"]</pre></p>
90
+ <p><?php /* translators: Also, treat "BCTT" as a brand name, don't translate it */ _e( 'If you are using the visual editor, click the BCTT birdie in the toolbar to add a pre-formatted shortcode to your post.', 'better-click-to-tweet' ); ?></p>
91
+ <p><?php _e( 'Tweet length is automatically shortened to 117 characters minus the length of your twitter name, to leave room for it and a link back to the post.', 'better-click-to-tweet' ); ?></p>
92
+ </div>
93
+ </div>
94
+ <div class="postbox">
95
+ <div class="inside">
96
+ <h2 class="hndle"><?php _e( 'Settings', 'better-click-to-tweet' ); ?></h2>
97
+ <p><?php _e( 'Enter your Twitter handle to add "via @yourhandle" to your tweets. Do not include the @ symbol.', 'better-click-to-tweet' ); ?></p>
98
+ <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>
99
+ <form method="post" action="options.php" style="display: inline-block;">
100
+ <?php settings_fields( 'bctt_clicktotweet-options' ); ?>
101
+
102
+ <table class="form-table">
103
+ <tr valign="top">
104
+ <th style="width: 200px;"><label><?php _ex('Your Twitter Handle', 'label for text input on settings screen', 'better-click-to-tweet'); ?></label></th>
105
+ <td><input type="text" name="bctt-twitter-handle" value="<?php echo get_option('bctt-twitter-handle'); ?>" /></td></tr>
106
+ <tr valign="top">
107
+ <th style="width: 200px;"><label><?php _ex('Use Short URL?', 'label for checkbox on settings screen', 'better-click-to-tweet'); ?></label></th>
108
+ <td><input type="checkbox" name="bctt-short-url" value="1" <?php if ( 1 == get_option( 'bctt-short-url') ) echo 'checked="checked"'; ?>" /></td>
109
+ </tr>
110
+ </table>
111
+ <br class="clear" />
112
+ <p><input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'better-click-to-tweet' ); ?>" /></p>
113
+ <br class="clear" />
114
+ <em><?php $url = 'http://benandjacq.com'; $link = sprintf( __( 'An open source plugin by <a href=%s>Ben Meredith</a>', 'better-click-to-tweet'), esc_url($url) ); echo $link; ?></em>
115
+ </form>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
  </div>
123
+ <?php
124
  }
125
 
126
 
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: 3.4.1
6
  Author: Ben Meredith
7
  Author URI: http://benandjacq.com
8
  Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
@@ -82,6 +82,7 @@ function bctt_shortcode( $atts ) {
82
  'tweet' => '',
83
  'via' => 'yes',
84
  'url' => 'yes',
 
85
  ), $atts ) );
86
 
87
  $handle = get_option( 'bctt-twitter-handle' );
@@ -134,7 +135,7 @@ function bctt_shortcode( $atts ) {
134
 
135
  }
136
 
137
- $bcttBttn = sprintf( __( 'Click To Tweet', 'better-click-to-tweet' ) );
138
 
139
  if( $url != 'no'){
140
 
@@ -145,13 +146,23 @@ function bctt_shortcode( $atts ) {
145
  $short = bctt_shorten( $text, ( 140 - ( $handle_length ) ) );
146
 
147
  }
148
-
 
 
 
 
 
 
 
 
 
 
149
  if ( !is_feed() ) {
150
 
151
- return "<div class='bctt-click-to-tweet'><span class='bctt-ctt-text'><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL."' target='_blank'>".$short."</a></span><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL . "' target='_blank' class='bctt-ctt-btn'>" . $bcttBttn . "</a></div>";
152
  } else {
153
 
154
- return "<hr /><p><em>" . $short . "</em><br /><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL . "' target='_blank' class='bctt-ctt-btn'>" . $bcttBttn . "</a><br /><hr />";
155
 
156
  };
157
  }
@@ -195,7 +206,7 @@ register_uninstall_hook( __FILE__, 'bctt_on_uninstall' );
195
 
196
  function bctt_options_link($links) {
197
 
198
- $settingsText = sprintf( __( 'Settings', 'better-click-to-tweet'));
199
 
200
  $settings_link = '<a href="options-general.php?page=better-click-to-tweet">'.$settingsText.'</a>';
201
 
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/
82
  'tweet' => '',
83
  'via' => 'yes',
84
  'url' => 'yes',
85
+ 'nofollow' => 'no',
86
  ), $atts ) );
87
 
88
  $handle = get_option( 'bctt-twitter-handle' );
135
 
136
  }
137
 
138
+ $bcttBttn = sprintf( _x( 'Click To Tweet', 'Text for the box on the reader-facing box', 'better-click-to-tweet' ) );
139
 
140
  if( $url != 'no'){
141
 
146
  $short = bctt_shorten( $text, ( 140 - ( $handle_length ) ) );
147
 
148
  }
149
+
150
+ if( $nofollow != 'no') {
151
+
152
+ $rel = "rel='nofollow'";
153
+
154
+ } else {
155
+
156
+ $rel = '';
157
+
158
+ }
159
+
160
  if ( !is_feed() ) {
161
 
162
+ return "<div class='bctt-click-to-tweet'><span class='bctt-ctt-text'><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL."' target='_blank'" . $rel . ">".$short." </a></span><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL . "' target='_blank' class='bctt-ctt-btn'" . $rel . ">" . $bcttBttn . "</a></div>";
163
  } else {
164
 
165
+ return "<hr /><p><em>" . $short . "</em><br /><a href='https://twitter.com/intent/tweet?text=" . urlencode($short) . $handle_code . $bcttURL . "' target='_blank' class='bctt-ctt-btn'" . $rel . ">" . $bcttBttn . "</a><br /><hr />";
166
 
167
  };
168
  }
206
 
207
  function bctt_options_link($links) {
208
 
209
+ $settingsText = sprintf( _x( 'Settings', 'text for the link on the plugins page', 'better-click-to-tweet'));
210
 
211
  $settings_link = '<a href="options-general.php?page=better-click-to-tweet">'.$settingsText.'</a>';
212
 
languages/better-click-to-tweet-es_ES.mo CHANGED
Binary file
languages/better-click-to-tweet-es_ES.po CHANGED
@@ -1,136 +1,199 @@
 
 
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"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
- "X-Poedit-Basepath: ..\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
16
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
17
- "_nx_noop:3c,1,2;__ngettext_noop:1,2\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."
34
  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: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."
52
  msgstr ""
53
- "Si está utilizando el editor visual, haga clic en el pajarito BCTT en la "
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."
61
  msgstr ""
62
- "La longitud del tweet se acortará automáticamente a 117 caracteres menos la "
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."
74
  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: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 "
107
- "out the <a href=%s>plugin on Github.</a>"
108
- msgstr ""
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</"
116
- "a>"
117
- msgstr ""
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"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-03-27 18:02-0500\n"
 
 
 
 
 
12
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: es_ES\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 "Usted no tiene los permisos necesarios para acceder a esta página."
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 — un plugin por Ben Meredith"
27
+
28
+ #: bctt_options.php:53
29
+ msgid "About the Author"
30
+ msgstr "Sobre el autor"
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
+ "Este plugin es desarrollado por <a href=\"%s\">Ben Meredith</a>. Soy un "
38
+ "desarrollador freelance especializada en <a href=\"%s\">vencer y engañando a los "
39
+ "hackers</a>."
40
+
41
+ #: bctt_options.php:58
42
+ msgid "Sign up to receive my FREE web strategy guide"
43
+ msgstr "Regístrese para recibir a mi guía de estrategia web gratis (Solamente Inglés)"
44
+
45
+ #: bctt_options.php:59
46
+ msgctxt "placeholder text for input field"
47
+ msgid "Your Email Address"
48
+ msgstr "Su dirección email"
49
+
50
+ #: bctt_options.php:60
51
+ msgid "No Spam. One-click unsubscribe in every message"
52
+ msgstr "No Spam. Darse de baja de un clic en cada mensaje"
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
+ "¿Eres desarrollador? Me encantaría su ayuda para hacer mejor este plugin. Echa un "
60
+ "vistazo al <a href=%s>plugin en Github.</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
+ "La mejor manera en que usted puede apoyar este y otros plugins es <a href=%s>donar</"
66
+ "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 "La segunda mejor manera es <a href=%s>dejar una revisión honesta.</a>"
71
+
72
+ #: bctt_options.php:76
73
+ msgid "Did this plugin save you enough time to be worth some money?"
74
+ msgstr "¿Este plugin le ahorra suficiente tiempo para valer algo de dinero?"
75
+
76
+ #: bctt_options.php:77
77
+ msgid "Click here to buy me a Coke to say thanks."
78
+ msgstr "Haga clic aquí y compre una Coca-Cola para decir gracias."
79
+
80
+ #: bctt_options.php:87
81
  msgid "Instructions"
82
  msgstr "Instrucciones"
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
+ "Para añadir casillas de texto de estilo \"click to tweet\" incluya el shortcode "
92
+ "\"Better Click To Tweet\" en su mensaje."
93
 
94
+ #: bctt_options.php:89
95
  msgid "Here's how you format the shortcode:"
96
  msgstr "Aquí está cómo formatear el shortcode:"
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 "Algo significativo para Twittear."
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
+ "Si está utilizando el editor visual, haga clic en el pajarito BCTT en la barra de "
111
+ "herramientas para añadir un shortcode formateado previamente a su mensaje."
 
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
+ "La longitud del tweet se acortará automáticamente a 117 caracteres menos la longitud "
119
+ "de su nombre de Twitter, para dejar espacio para ella y un enlace de vuelta al tweet."
 
120
 
121
+ #: bctt_options.php:96
122
  msgid "Settings"
123
+ msgstr "Ajustes"
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
+ "Ingrese su nombre identificador de Twitter para agregar \"via @nombreIdentificador\" "
131
+ "a sus tweets. No incluya el símbolo @."
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
+ "Marca la casilla siguiente para mostrar la shortlink WordPress en lugar de la "
141
+ "dirección URL completa. Mientras que esto no afecte la longitud de tweet, es útil "
142
+ "junto con plugins que personalizar el shortlink WordPress usando servicios como bit."
143
+ "ly o yourls.org para el seguimiento"
144
 
145
+ #: bctt_options.php:104
146
+ msgctxt "label for text input on settings screen"
147
  msgid "Your Twitter Handle"
148
  msgstr "Su Identificador de Twitter"
149
 
150
+ #: bctt_options.php:107
151
+ msgctxt "label for checkbox on settings screen"
152
  msgid "Use Short URL?"
153
  msgstr "¿Usa URL corta?"
154
 
155
+ #: bctt_options.php:112
156
+ msgid "Save Changes"
157
+ msgstr "Guardar cambios"
158
+
159
+ #: bctt_options.php:114
160
  msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
161
  msgstr "Un plugin de código abierto por <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 "Click Para Twittear"
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
+ #: better-click-to-tweet.php:209
169
+ msgctxt "text for the link on the plugins page"
170
+ msgid "Settings"
171
+ msgstr "Ajustes"
172
 
173
+ #. Plugin Name of the plugin/theme
174
+ msgid "Better Click To Tweet"
175
+ msgstr "Better Click To Tweet"
176
 
177
+ #. Plugin URI of the plugin/theme
178
+ msgid "https://wordpress.org/plugins/better-click-to-tweet/"
179
+ msgstr "https://wordpress.org/plugins/better-click-to-tweet/"
180
 
181
+ #. Description of the plugin/theme
182
+ msgid ""
183
+ "The only Click To Tweet plugin to add translation support. The only Click To Tweet "
184
+ "plugin to take into account your Twitter username's length in truncating long "
185
+ "tweets, or to correctly take into account non-Roman characters. Simply put, as Click "
186
+ "To Tweet plugins go, this one is, well, BETTER."
187
+ msgstr ""
188
+ "El único clic a Tweet plugin para agregar compatibilidad con traducción. El plugin "
189
+ "Click a Tweet sólo tome en cuenta la longitud de su nombre de usuario Twitter en "
190
+ "truncar largos tweets, o tomar en caracteres no romanos cuenta correctamente. En "
191
+ "pocas palabras, como haga clic para Tweet plugins, ésta es, bueno, mejor."
192
+
193
+ #. Author of the plugin/theme
194
+ msgid "Ben Meredith"
195
+ msgstr "Ben Meredith"
196
+
197
+ #. Author URI of the plugin/theme
198
+ msgid "http://benandjacq.com"
199
+ msgstr "http://benandjacq.com"
languages/better-click-to-tweet.pot CHANGED
@@ -2,9 +2,10 @@
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"
@@ -12,56 +13,110 @@ msgstr ""
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, "
@@ -69,54 +124,38 @@ msgid ""
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 "
@@ -126,10 +165,3 @@ msgid ""
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 ""
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-"
7
+ "tweet\n"
8
+ "POT-Creation-Date: 2015-03-27 20:56:20+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
+ #: bctt_options.php:40
17
  msgid "You do not have sufficient permissions to access this page."
18
  msgstr ""
19
 
20
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
21
+ #. it
22
+ #: bctt_options.php:45
23
+ msgid "Better Click To Tweet — a plugin by Ben Meredith"
24
+ msgstr ""
25
+
26
+ #: bctt_options.php:53
27
+ msgid "About the Author"
28
+ msgstr ""
29
+
30
+ #: bctt_options.php:57
31
+ msgid ""
32
+ "This plugin is developed by <a href=\"%s\">Ben Meredith</a>. I am a "
33
+ "freelance developer specializing in <a href=\"%s\">outrunning and "
34
+ "outsmarting hackers</a>."
35
+ msgstr ""
36
+
37
+ #: bctt_options.php:58
38
+ msgid "Sign up to receive my FREE web strategy guide"
39
+ msgstr ""
40
+
41
+ #: bctt_options.php:59
42
+ msgctxt "placeholder text for input field"
43
+ msgid "Your Email Address"
44
+ msgstr ""
45
+
46
+ #: bctt_options.php:60
47
+ msgid "No Spam. One-click unsubscribe in every message"
48
+ msgstr ""
49
+
50
+ #: bctt_options.php:74
51
+ msgid ""
52
+ "Are you a developer? I would love your help making this plugin better. Check "
53
+ "out the <a href=%s>plugin on Github.</a>"
54
+ msgstr ""
55
+
56
+ #: bctt_options.php:75
57
+ msgid ""
58
+ "The best way you can support this and other plugins is to <a href=%s>donate</"
59
+ "a>"
60
+ msgstr ""
61
+
62
+ #: bctt_options.php:75
63
+ msgid "The second best way is to <a href=%s>leave an honest review.</a>"
64
+ msgstr ""
65
+
66
+ #: bctt_options.php:76
67
+ msgid "Did this plugin save you enough time to be worth some money?"
68
+ msgstr ""
69
+
70
+ #: bctt_options.php:77
71
+ msgid "Click here to buy me a Coke to say thanks."
72
+ msgstr ""
73
+
74
+ #: bctt_options.php:87
75
  msgid "Instructions"
76
  msgstr ""
77
 
78
  #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
79
  #. it
80
+ #: bctt_options.php:88
81
  msgid ""
82
  "To add styled click-to-tweet quote boxes include the Better Click To Tweet "
83
  "shortcode in your post."
84
  msgstr ""
85
 
86
+ #: bctt_options.php:89
87
  msgid "Here's how you format the shortcode:"
88
  msgstr ""
89
 
90
  #. translators: This text shows up as a sample tweet in the instructions for
91
  #. how to use the plugin.
92
+ #: bctt_options.php:89
93
  msgid "Meaningful, tweetable quote."
94
  msgstr ""
95
 
96
  #. translators: Also, treat "BCTT" as a brand name, don't translate it
97
+ #: bctt_options.php:90
98
  msgid ""
99
  "If you are using the visual editor, click the BCTT birdie in the toolbar to "
100
  "add a pre-formatted shortcode to your post."
101
  msgstr ""
102
 
103
+ #: bctt_options.php:91
104
  msgid ""
105
  "Tweet length is automatically shortened to 117 characters minus the length "
106
  "of your twitter name, to leave room for it and a link back to the post."
107
  msgstr ""
108
 
109
+ #: bctt_options.php:96
110
  msgid "Settings"
111
  msgstr ""
112
 
113
+ #: bctt_options.php:97
114
  msgid ""
115
  "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
116
  "include the @ symbol."
117
  msgstr ""
118
 
119
+ #: bctt_options.php:98
120
  msgid ""
121
  "Checking the box below will force the plugin to show the WordPress shortlink "
122
  "in place of the full URL. While this does not impact tweet character length, "
124
  "services like bit.ly or yourls.org for tracking"
125
  msgstr ""
126
 
127
+ #: bctt_options.php:104
128
+ msgctxt "label for text input on settings screen"
129
  msgid "Your Twitter Handle"
130
  msgstr ""
131
 
132
+ #: bctt_options.php:107
133
+ msgctxt "label for checkbox on settings screen"
134
  msgid "Use Short URL?"
135
  msgstr ""
136
 
137
+ #: bctt_options.php:112
138
+ msgid "Save Changes"
 
 
 
 
 
 
 
 
 
 
 
 
139
  msgstr ""
140
 
141
+ #: bctt_options.php:114
142
+ msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
 
 
 
 
143
  msgstr ""
144
 
145
+ #: better-click-to-tweet.php:138
146
+ msgctxt "Text for the box on the reader-facing box"
147
+ msgid "Click To Tweet"
148
  msgstr ""
149
 
150
+ #: better-click-to-tweet.php:209
151
+ msgctxt "text for the link on the plugins page"
152
+ msgid "Settings"
153
  msgstr ""
154
 
155
  #. Plugin Name of the plugin/theme
156
  msgid "Better Click To Tweet"
157
  msgstr ""
158
 
 
 
 
 
159
  #. Description of the plugin/theme
160
  msgid ""
161
  "The only Click To Tweet plugin to add translation support. The only Click To "
165
  "BETTER."
166
  msgstr ""
167
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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, translation-ready
5
  Requires at least: 3.8
6
- Tested up to: 4.1.1
7
- Stable tag: 3.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,6 +24,8 @@ 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
  Translators:
28
 
29
  * Español (es_ES): Jordi Rosalez
@@ -49,7 +51,7 @@ Translators:
49
  = How Does Better Click To Tweet Work? =
50
  Better Click To Tweet enables you to create beautiful Click To Tweet boxes in your blog posts. Once you've installed and activated the plugin, click on the settings link to put in your Twitter username, and save the settings.
51
 
52
- Then, wherever you want to insert a Click to Tweet quote, use a shortcode in the format `[bctt tweet="xxxxxxxxxxxx"]` replacing the xxxxxxx with your tweetable quote.
53
 
54
  As of version 3.1, you can leave off the "via @YourHandle" on a tweet-by-tweet basis by including using a shortcode in the format of `[bctt tweet="xxxxxxxxxxx" via="no"]`
55
 
@@ -76,6 +78,9 @@ If you run into any issues with my plugin not working alongside a certain link s
76
 
77
  I've also written a tutorial at http://benlikes.us/79 for how to set up the shortlinks with bit.ly and yourls.org.
78
 
 
 
 
79
  = What do I do if it's not working right? =
80
  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.
81
 
@@ -89,7 +94,7 @@ The bottom line for an end user is that both plugins are great, with the main di
89
  Also from an end user perspective, I am more active in the support forums than Justin (who has a paid product to support, which justifiably takes more of his time and energy), and you can count on my response and resolution to your issues!
90
 
91
  = How can I help? =
92
- I want to maximize the usefulness of this plugin by translating it into multiple languages. So far I have included Spanish. If you have experience translating .po files, please consider helping in that way. To include those translations in the official plugin, email me, or submit pull requests at Github.
93
 
94
  == Screenshots ==
95
 
@@ -98,6 +103,11 @@ I want to maximize the usefulness of this plugin by translating it into multiple
98
 
99
  == Changelog ==
100
 
 
 
 
 
 
101
  = 3.4.1 =
102
  * added Serbian translation courtesy of [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
103
 
@@ -159,6 +169,11 @@ I want to maximize the usefulness of this plugin by translating it into multiple
159
 
160
  == Upgrade Notice ==
161
 
 
 
 
 
 
162
  = 3.4.1 =
163
  * added Serbian language files.
164
 
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, 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
 
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
51
  = How Does Better Click To Tweet Work? =
52
  Better Click To Tweet enables you to create beautiful Click To Tweet boxes in your blog posts. Once you've installed and activated the plugin, click on the settings link to put in your Twitter username, and save the settings.
53
 
54
+ Then, wherever you want to insert a Click to Tweet quote, use a shortcode in the format `[bctt tweet="xxxxxxxxxxxx"]` replacing the `xxxxxxx` with your tweetable quote.
55
 
56
  As of version 3.1, you can leave off the "via @YourHandle" on a tweet-by-tweet basis by including using a shortcode in the format of `[bctt tweet="xxxxxxxxxxx" via="no"]`
57
 
78
 
79
  I've also written a tutorial at http://benlikes.us/79 for how to set up the shortlinks with bit.ly and yourls.org.
80
 
81
+ = Are there any other hidden tricks? =
82
+ Yes! Because I want the majority of users (who aren't as concerned with options like nofollow links and getting rid of the URL in the tweet) to be happy, most options are hidden. I've written a tutorial for using those advanced options over at http://benlikes.us/7r
83
+
84
  = What do I do if it's not working right? =
85
  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.
86
 
94
  Also from an end user perspective, I am more active in the support forums than Justin (who has a paid product to support, which justifiably takes more of his time and energy), and you can count on my response and resolution to your issues!
95
 
96
  = How can I help? =
97
+ I want to maximize the usefulness of this plugin by translating it into multiple languages. So far I have included Spanish and Serbian. If you have experience translating .po files, please consider helping in that way. To include those translations in the official plugin, email me, or submit pull requests at Github.
98
 
99
  == Screenshots ==
100
 
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.
109
+ * complete overhaul of the settings page for better readability.
110
+
111
  = 3.4.1 =
112
  * added Serbian translation courtesy of [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
113
 
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.
175
+ * complete overhaul of the settings page for better readability.
176
+
177
  = 3.4.1 =
178
  * added Serbian language files.
179