Better Click To Tweet - Version 5.6.2

Version Description

Download this release

Release Info

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

Code changes from version 5.6.1 to 5.6.2

Files changed (40) hide show
  1. better-click-to-tweet.php +1 -1
  2. readme.txt +4 -1
  3. trunk/admin-nags.php +0 -117
  4. trunk/assets/block/build/editor.css +0 -0
  5. trunk/assets/block/build/editor.rtl.css +0 -0
  6. trunk/assets/block/build/script.js +0 -6
  7. trunk/assets/block/init.php +0 -76
  8. trunk/assets/css/bctt-admin.css +0 -14
  9. trunk/assets/css/bcttstyle.css +0 -60
  10. trunk/assets/css/styles.css +0 -81
  11. trunk/assets/img/birdy.png +0 -0
  12. trunk/assets/img/birdy_button.png +0 -0
  13. trunk/assets/img/empty.gif +0 -0
  14. trunk/assets/img/premium_style.png +0 -0
  15. trunk/assets/tinymce/bctt-tinymce.php +0 -109
  16. trunk/assets/tinymce/css/bctt-admin.css +0 -18
  17. trunk/assets/tinymce/js/tinymce-bctt.js +0 -71
  18. trunk/assets/tinymce/languages/bctt-mce-locale.php +0 -25
  19. trunk/bctt-i18n.php +0 -7
  20. trunk/bctt_options.php +0 -261
  21. trunk/better-click-to-tweet.php +0 -348
  22. trunk/i18n-module.php +0 -280
  23. trunk/languages/better-click-to-tweet-de_DE.mo +0 -0
  24. trunk/languages/better-click-to-tweet-de_DE.po +0 -199
  25. trunk/languages/better-click-to-tweet-el.mo +0 -0
  26. trunk/languages/better-click-to-tweet-el.po +0 -230
  27. trunk/languages/better-click-to-tweet-es_ES.mo +0 -0
  28. trunk/languages/better-click-to-tweet-es_ES.po +0 -234
  29. trunk/languages/better-click-to-tweet-fi.mo +0 -0
  30. trunk/languages/better-click-to-tweet-fi.po +0 -226
  31. trunk/languages/better-click-to-tweet-it_IT.mo +0 -0
  32. trunk/languages/better-click-to-tweet-it_IT.po +0 -230
  33. trunk/languages/better-click-to-tweet-ru_RU.mo +0 -0
  34. trunk/languages/better-click-to-tweet-ru_RU.po +0 -197
  35. trunk/languages/better-click-to-tweet-sr_RS.mo +0 -0
  36. trunk/languages/better-click-to-tweet-sr_RS.po +0 -155
  37. trunk/languages/better-click-to-tweet-sv_SE.mo +0 -0
  38. trunk/languages/better-click-to-tweet-sv_SE.po +0 -187
  39. trunk/languages/better-click-to-tweet.pot +0 -202
  40. trunk/readme.txt +0 -362
better-click-to-tweet.php CHANGED
@@ -2,7 +2,7 @@
2
/**
3
* Plugin Name: Better Click To Tweet
4
* Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
- * Version: 5.6.1
6
* Author: Ben Meredith
7
* Author URI: https://www.betterclicktotweet.com
8
* Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
2
/**
3
* Plugin Name: Better Click To Tweet
4
* Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
+ * Version: 5.6.2
6
* Author: Ben Meredith
7
* Author URI: https://www.betterclicktotweet.com
8
* Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.wpsteward.com/donations/plugin-support/
4
Tags: click to tweet, twitter, tweet,
5
Requires at least: 3.8
6
Tested up to: 4.9
7
- Stable tag: 5.6.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -101,6 +101,9 @@ Donations: http://benlikes.us/donate
101
102
== Changelog ==
103
104
= 5.6.1 =
105
* fix — another attempt at the "invalid headers" intermittent problem.
106
4
Tags: click to tweet, twitter, tweet,
5
Requires at least: 3.8
6
Tested up to: 4.9
7
+ Stable tag: 5.6.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
101
102
== Changelog ==
103
104
+ = 5.6.3 =
105
+ * fix — resolving zip problem.
106
+
107
= 5.6.1 =
108
* fix — another attempt at the "invalid headers" intermittent problem.
109
trunk/admin-nags.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
-
3
- function bctt_alerts() {
4
- if (is_plugin_active('better-click-to-tweet-premium-styles/better-click-to-tweet-premium-styles.php')) {
5
- return;
6
- }
7
-
8
- $screen = get_current_screen();
9
-
10
- $screenparent = $screen->parent_file;
11
-
12
-
13
- if ( $screenparent == 'plugins.php' && current_user_can( 'install_plugins' ) ) {
14
-
15
- $user_id = wp_get_current_user()->ID;
16
- $has_dismissed = get_user_meta( $user_id, 'bctt_has_dismissed_nag', true );
17
-
18
- if ( ! $has_dismissed && ! bctt_add_custom_style_option() ) {
19
- //add style inline so that it isn't enqueued if not used
20
- ?>
21
- <style>
22
- span.bctt-addon-nag-header {
23
- font-size: large;
24
- font-weight: bold;
25
- }
26
-
27
- .updated.bctt-addon-nag {
28
- padding: 1em;
29
- }
30
-
31
- p.bctt-addon-nag-copy {
32
-
33
- }
34
-
35
- ul.bctt-addon-nag-list {
36
- list-style-type: none;
37
- margin-left: 2em;
38
- }
39
-
40
- .bctt-addon-nag-list li:before {
41
- content: "\f155";
42
- display: inline-block;
43
- -webkit-font-smoothing: antialiased;
44
- font: normal 16px/1 'dashicons';
45
- color: #46b450;
46
- margin-right: 10px;
47
- word-wrap: break-word;
48
- }
49
-
50
- .bctt-addon-nag-dismiss {
51
- float: right;
52
- text-decoration: none;
53
- }
54
- .bctt-nag-photo {
55
- float: right;
56
- margin:0;
57
- max-height:105px;
58
- max-width:98%;
59
- }
60
- @media screen and (max-width: 782px) {
61
- .bctt-nag-photo {
62
- float:none;
63
- }
64
- }
65
- .bctt-nag-purchase-link {
66
- font-size: large;
67
- }
68
- </style>
69
- <div class="updated bctt-addon-nag">
70
-
71
- <a href="<?php
72
- //The Dismiss Button.
73
- $nag_meta_key = 'bctt_has_dismissed_nag';
74
- $nag_admin_dismiss_url = 'plugins.php?' . $nag_meta_key . '=0';
75
- echo esc_url( admin_url( $nag_admin_dismiss_url ) ); ?>" class="dismiss bctt-addon-nag-dismiss">Dismiss this <span
76
- class="dashicons dashicons-dismiss"></span></a>
77
- <h3
78
- class="bctt-addon-nag-header"><?php esc_html_e( 'Add Premium Style to your Better Click To Tweet boxes!', 'better-click-to-tweet' ) ?></h3>
79
-
80
- <a href="http://benlikes.us/bcttnag"
81
- target="_blank"><img class="bctt-nag-photo" src="<?php echo esc_url( plugins_url() . '/better-click-to-tweet/assets/img/premium_style.png' ); ?>"/></a>
82
-
83
- <p class="bctt-addon-nag-copy"><?php esc_attr_e( 'Choose from multiple options when styling your Better Click To Tweet boxes, with no code.', 'better-click-to-tweet' ) ?></p>
84
- <ul class="bctt-addon-nag-list">
85
- <li><?php esc_html_e( 'Make your Better Click To Tweet boxes stand out.', 'better-click-to-tweet' ) ?></li>
86
- <li><?php esc_html_e( 'Get more clicks and tweets.', 'better-click-to-tweet' ) ?></li>
87
- <li><?php esc_html_e( 'Support the development of Better Click To Tweet!', 'better-click-to-tweet' ) ?></li>
88
- </ul>
89
- <p class="bctt-addon-nag-copy">
90
- <a class="bctt-nag-purchase-link" href="http://benlikes.us/bcttnag"
91
- target="_blank"><?php esc_html_e( 'Purchase it today', 'better-click-to-tweet' ) ?></a> <?php esc_html_e( 'Save 8% with the code NAGSareTHEbest', 'better-click-to-tweet') ?></p>
92
- </div>
93
- <?php
94
- }
95
- }
96
- }
97
-
98
- add_action( 'admin_notices', 'bctt_alerts' );
99
-
100
- function bctt_addon_notice_ignore() {
101
-
102
- /**
103
- * If user clicks to ignore the notice, add that to their user meta the banner then checks whether this tag exists already or not.
104
- * See here: http://codex.wordpress.org/Function_Reference/add_user_meta
105
- */
106
-
107
- if ( isset( $_GET['bctt_has_dismissed_nag'] ) && '0' == $_GET['bctt_has_dismissed_nag'] ) {
108
-
109
- //Get the global user
110
- $current_user = wp_get_current_user();
111
- $user_id = $current_user->ID;
112
-
113
- add_user_meta( $user_id, 'bctt_has_dismissed_nag', 'true', true );
114
- }
115
- }
116
-
117
- add_action( 'current_screen', 'bctt_addon_notice_ignore' );
trunk/assets/block/build/editor.css DELETED
File without changes
trunk/assets/block/build/editor.rtl.css DELETED
File without changes
trunk/assets/block/build/script.js DELETED
@@ -1,6 +0,0 @@
1
- this.bctt=this.bctt||{},this.bctt.main=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(7),o=n(8);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(33);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){!function(){t.exports=this.wp.editor}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=(n.n(r),n(12)),u=(n.n(o),n(13)),c=n(14),i=n(49);e.default=Object(o.registerBlockType)("bctt/clicktotweet",{title:Object(r.__)("Better Click to Tweet"),description:Object(r.__)("Add text for your readers to tweet, calling them to action on your behalf."),category:"widgets",icon:"twitter",keywords:[Object(r.__)("Twitter"),Object(r.__)("Tweet")],attributes:u.a,edit:c.a,save:i.a})},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e,n){"use strict";var r=n(0),o=(n.n(r),{tweet:{type:"string"},username:{type:"string",default:bctt_options_js.username},via:{type:"boolean",default:!0},url:{type:"boolean",default:!0},urlcustom:{type:"string"},nofollow:{type:"boolean",default:!1},prompt:{type:"string",default:Object(r.__)("Click To Tweet")}});e.a=o},function(t,e,n){"use strict";var r=n(15),o=n.n(r),u=n(44),c=n.n(u),i=n(0),a=(n.n(i),n(45)),f=(n.n(a),n(10)),l=(n.n(f),n(46)),s=n(48),p=(n.n(s),function(t){var e=t.attributes,n=t.setAttributes,r=t.className,u=e.tweet,s=e.prompt,p=function(t){n({tweet:t})},v=function(){return!1};return wp.element.createElement(a.Fragment,null,wp.element.createElement(l.a,o()({},t)),wp.element.createElement("span",{className:c()(r,"bctt-click-to-tweet")},wp.element.createElement("span",{className:"bctt-ctt-text"},wp.element.createElement(f.RichText,{format:"string",formattingControls:[],tagName:"div",placeholder:Object(i.__)("Enter text for readers to Tweet"),onChange:p,value:u})),wp.element.createElement("a",{href:"#",onClick:v,className:"bctt-ctt-btn"},s)))});e.a=p},function(t,e,n){"use strict";e.__esModule=!0;var r=n(16),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){t.exports={default:n(17),__esModule:!0}},function(t,e,n){n(18),t.exports=n(5).Object.assign},function(t,e,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(29)})},function(t,e,n){var r=n(1),o=n(5),u=n(20),c=n(22),i=function(t,e,n){var a,f,l,s=t&i.F,p=t&i.G,v=t&i.S,b=t&i.P,m=t&i.B,h=t&i.W,y=p?o:o[e]||(o[e]={}),w=y.prototype,_=p?r:v?r[e]:(r[e]||{}).prototype;p&&(n=e);for(a in n)(f=!s&&_&&void 0!==_[a])&&a in y||(l=f?_[a]:n[a],y[a]=p&&"function"!=typeof _[a]?n[a]:m&&f?u(l,r):h&&_[a]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):b&&"function"==typeof l?u(Function.call,l):l,b&&((y.virtual||(y.virtual={}))[a]=l,t&i.R&&w&&!w[a]&&c(w,a,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,t.exports=i},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(23),o=n(28);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(24),o=n(25),u=n(27),c=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(1).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=n(30),o=n(41),u=n(42),c=n(43),i=n(7),a=Object.assign;t.exports=!a||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=a({},t)[n]||Object.keys(a({},e)).join("")!=r})?function(t,e){for(var n=c(t),a=arguments.length,f=1,l=o.f,s=u.f;a>f;)for(var p,v=i(arguments[f++]),b=l?r(v).concat(l(v)):r(v),m=b.length,h=0;m>h;)s.call(v,p=b[h++])&&(n[p]=v[p]);return n}:a},function(t,e,n){var r=n(31),o=n(40);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(32),o=n(6),u=n(34)(!1),c=n(37)("IE_PROTO");t.exports=function(t,e){var n,i=o(t),a=0,f=[];for(n in i)n!=c&&r(i,n)&&f.push(n);for(;e.length>a;)r(i,n=e[a++])&&(~u(f,n)||f.push(n));return f}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(6),o=n(35),u=n(36);t.exports=function(t){return function(e,n,c){var i,a=r(e),f=o(a.length),l=u(c,f);if(t&&n!=n){for(;f>l;)if((i=a[l++])!=i)return!0}else for(;f>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(9),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(9),o=Math.max,u=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):u(t,e)}},function(t,e,n){var r=n(38)("keys"),o=n(39);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(8);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r,o;/*!
2
- Copyright (c) 2016 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */
6
- !function(){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r))t.push(n.apply(null,r));else if("object"===o)for(var c in r)u.call(r,c)&&r[c]&&t.push(c)}}return t.join(" ")}var u={}.hasOwnProperty;void 0!==t&&t.exports?t.exports=n:(r=[],void 0!==(o=function(){return n}.apply(e,r))&&(t.exports=o))}()},function(t,e){!function(){t.exports=this.wp.element}()},function(t,e,n){"use strict";var r=n(0),o=(n.n(r),n(10)),u=(n.n(o),n(47)),c=(n.n(u),function(t){var e=t.attributes,n=t.setAttributes,c=e.username,i=e.via,a=e.url,f=e.urlcustom,l=e.nofollow,s=e.prompt,p=function(t){n({username:t})},v=function(){n({via:!i})},b=function(){n({url:!a})},m=function(t){n({urlcustom:t})},h=function(){n({nofollow:!l})},y=function(t){n({prompt:t})};return wp.element.createElement(o.InspectorControls,{key:"inspector"},wp.element.createElement(u.PanelBody,{Title:Object(r.__)("Tweet Settings")},wp.element.createElement(u.TextControl,{label:Object(r.__)("Twitter Username"),value:c,onChange:p}),wp.element.createElement(u.ToggleControl,{label:Object(r.__)("Include the username in Tweet?"),checked:!!i,onChange:v}),wp.element.createElement(u.ToggleControl,{label:Object(r.__)("Include URL in tweet?"),checked:!!a,onChange:b}),wp.element.createElement(u.TextControl,{label:Object(r.__)("Custom URL"),value:f,onChange:m,help:Object(r.__)("Custom URL to use instead of post")}),wp.element.createElement(u.ToggleControl,{label:Object(r.__)("Nofollow"),checked:!!l,onChange:h,help:Object(r.__)("Make links nofollow")}),wp.element.createElement(u.TextControl,{label:Object(r.__)("Prompt"),value:s,onChange:y,help:Object(r.__)("Text for action/prompt link")})))});e.a=c},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){},function(t,e,n){"use strict";var r=function(){return null};e.a=r}]);
trunk/assets/block/init.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- /**
3
- * Blocks Registration
4
- *
5
- * Enqueue CSS/JS for the blocks & register callback to render shortcode on frontend
6
- */
7
- // Exit if accessed directly.
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- // Enqueue Block assets
13
- function bctt_block_editor_assets() {
14
- wp_enqueue_script('bctt-block-js', plugins_url('block/build/script.js', dirname(__FILE__)), array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-editor' ));
15
- if ( ! bctt_is_default_styles_dequeued() ) {
16
- $stylesheet_url = bctt_get_stylesheet_url();
17
-
18
- wp_enqueue_style( 'bctt-block-editor-css', $stylesheet_url, array(), 'all' );
19
- }
20
- // Add plugin options for block
21
- $bctt_data = array(
22
- 'username' => get_option( 'bctt-twitter-handle' ),
23
- );
24
- wp_localize_script( 'bctt-block-js', 'bctt_options_js', $bctt_data );
25
- }
26
-
27
- // Hook assets to editor
28
- add_action('enqueue_block_editor_assets', 'bctt_block_editor_assets');
29
-
30
- // Server side rendering callback to output shortcode
31
- register_block_type('bctt/clicktotweet', [
32
- 'render_callback' => 'bctt_block_callback',
33
- 'attributes' => array(
34
- 'tweet' => array(
35
- 'type' => 'string',
36
- ),
37
- 'username' => array(
38
- 'type' => 'string',
39
- 'default' => get_option( 'bctt-twitter-handle' )
40
- ),
41
- 'via' => array(
42
- 'type' => 'boolean',
43
- 'default' => true
44
- ),
45
- 'url' => array(
46
- 'type' => 'boolean',
47
- 'default' => true
48
- ),
49
- 'urlcustom' => array(
50
- 'type' => 'string'
51
- ),
52
- 'nofollow' => array(
53
- 'type' => 'boolean',
54
- 'default' => false
55
- ),
56
- 'prompt' => array(
57
- 'type' => 'string',
58
- 'default' => sprintf( _x( 'Click To Tweet', 'Text for the box on the reader-facing box', 'better-click-to-tweet' ) )
59
- ),
60
- ),
61
- ]);
62
-
63
- // Callback function to render bctt on frontend
64
- function bctt_block_callback( $attributes ) {
65
-
66
- //echo var_dump($attributes);
67
- //exit;
68
- extract( $attributes );
69
-
70
- $url = ($url ? 'yes' : 'no');
71
-
72
- $shortcode_string = '[bctt tweet="%s" url="%s" via="%s" username="%s" nofollow="%s" prompt="%s"]';
73
-
74
- return sprintf( $shortcode_string, $tweet, ($urlcustom ? $urlcustom : $url), ( $via ? 'yes' : 'no' ), $username, ( $nofollow ? 'yes' : 'no' ), $prompt);
75
- }
76
-
trunk/assets/css/bctt-admin.css DELETED
@@ -1,14 +0,0 @@
1
- #post-box-container-1 {
2
- float:right;
3
- margin-right: -300px;
4
- }
5
- .bctt-signup {
6
- font-size:unset;
7
- }
8
-
9
- @media only screen and (max-width: 850px) {
10
- #post-box-container-1 {
11
-
12
- margin-right: 0;
13
- }
14
- }
trunk/assets/css/bcttstyle.css DELETED
@@ -1,60 +0,0 @@
1
- .bctt-click-to-tweet {
2
- display: block;
3
- background-color: #FFF;
4
- position: relative;
5
- border-top: 2px solid black;
6
- border-bottom: 2px solid black;
7
- padding: 19px 12px 19px 18px;
8
- margin-bottom: 1em;
9
- }
10
-
11
- .bctt-click-to-tweet:after {
12
- content: ".";
13
- display: block;
14
- clear: both;
15
- visibility: hidden;
16
- line-height: 0;
17
- height: 0;
18
- }
19
-
20
- .bctt-ctt-text a {
21
- padding: 15px 0px;
22
- margin: 15px 0;
23
- position: relative;
24
- color: #000 !important;
25
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
26
- font-size: 1.5em;
27
- line-height: 140%;
28
- font-weight: 100;
29
- text-decoration: none !important;
30
- text-transform: none !important;
31
- word-wrap: break-word;
32
- border-bottom: none !important;
33
- box-shadow: none !important;
34
- }
35
-
36
- .bctt-ctt-text a:hover {
37
- text-decoration: none;
38
- color: #999 !important;
39
- }
40
-
41
- a.bctt-ctt-btn {
42
- border-bottom: none !important;
43
- box-shadow: none !important;
44
- margin: 0;
45
- padding: 18px 0 0 0;
46
- position: relative;
47
- display: block;
48
- text-transform: uppercase;
49
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
50
- font-size: .7em;
51
- font-weight: bold;
52
- color: #999999 !important;
53
- float: right;
54
- text-decoration: none !important;
55
- }
56
-
57
- .bctt-ctt-btn:hover {
58
- text-decoration: none;
59
- color: #666666 !important;
60
- }
trunk/assets/css/styles.css DELETED
@@ -1,81 +0,0 @@
1
-
2
- .bctt-click-to-tweet {
3
- display: block;
4
- background-color: #fff;
5
- position: relative;
6
- border: 1px solid #dddddd;
7
- -moz-border-radius: 4px;
8
- border-radius: 4px;
9
- padding: 15px 15px 15px 30px;
10
- margin-bottom: 1em;
11
- margin-top: 1.75em;
12
- }
13
-
14
- .bctt-click-to-tweet:after {
15
- content: ".";
16
- display: block;
17
- clear: both;
18
- visibility: hidden;
19
- line-height: 0;
20
- height: 0;
21
- }
22
-
23
- /* For compatibility with the new editor in version 5.0 codenamed Gutenberg */
24
-
25
- .bctt-click-to-tweet .mce-content-body {
26
- position: relative;
27
- color: #000 !important;
28
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
29
- font-size: 1.5em;
30
- line-height: 140%;
31
- font-weight: 100;
32
- text-decoration: none !important;
33
- text-transform: none !important;
34
- word-wrap: break-word;
35
- border-bottom: none !important;
36
- box-shadow: none !important;
37
- }
38
-
39
- .bctt-ctt-text a {
40
- padding: 15px 0;
41
- margin: 15px 0;
42
- position: relative;
43
- color: #000 !important;
44
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
45
- font-size: 1.5em;
46
- line-height: 140%;
47
- font-weight: 100;
48
- text-decoration: none !important;
49
- text-transform: none !important;
50
- word-wrap: break-word;
51
- border-bottom: none !important;
52
- box-shadow: none !important;
53
- }
54
-
55
- .bctt-ctt-text a:hover {
56
- text-decoration: none;
57
- color: #999 !important;
58
- }
59
-
60
- a.bctt-ctt-btn {
61
- border-bottom: none !important;
62
- margin: 0;
63
- padding: 11px 24px 0 0;
64
- position: relative;
65
- display: block;
66
- text-transform: uppercase;
67
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
68
- font-size: .7em;
69
- font-weight: bold;
70
- color: #999999 !important;
71
- float: right;
72
- text-decoration: none !important;
73
- background: transparent url(../img/birdy.png) no-repeat right top 10px;
74
- box-shadow: none !important;
75
- }
76
-
77
- .bctt-ctt-btn:hover {
78
- text-decoration: none;
79
- color: #666666 !important;
80
- background: transparent url(../img/birdy.png) no-repeat right top 8px;
81
- }
trunk/assets/img/birdy.png DELETED
Binary file
trunk/assets/img/birdy_button.png DELETED
Binary file
trunk/assets/img/empty.gif DELETED
Binary file
trunk/assets/img/premium_style.png DELETED
Binary file
trunk/assets/tinymce/bctt-tinymce.php DELETED
@@ -1,109 +0,0 @@
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_languages', array( __class__, 'bctt_tinymce_languages' ) );
43
- add_filter( 'mce_external_plugins', array( __class__, 'bctt_tinymce_core' ) );
44
- add_filter( 'mce_buttons', array( __class__, 'bctt_tinymce_buttons' ) );
45
- }
46
-
47
- /**
48
- * loader for the language strings
49
- *
50
- */
51
- public static function bctt_tinymce_languages( $bctt_locales ) {
52
- $bctt_locales['bctt'] = plugin_dir_path( __FILE__ ) . '/languages/bctt-mce-locale.php';
53
-
54
- return $bctt_locales;
55
- }
56
-
57
- /**
58
- * loader for the required JS
59
- *
60
- * @param [type] $plugin_array [description]
61
- *
62
- * @return [type] [description]
63
- */
64
- public static function bctt_tinymce_core( $plugin_array ) {
65
-
66
- // add our JS file
67
- $plugin_array['bctt'] = plugins_url( '/js/tinymce-bctt.js', __FILE__ );
68
-
69
- // return the array
70
- return $plugin_array;
71
- }
72
-
73
- /**
74
- * Add the button key for event link via JS
75
- *
76
- * @param [type] $buttons [description]
77
- *
78
- * @return [type] [description]
79
- */
80
- public static function bctt_tinymce_buttons( $buttons ) {
81
-
82
- // set the 'kitchen sink' button as a variable for later
83
- $sink = array_search( 'wp_adv', $buttons );
84
-
85
- // remove the sink
86
- if ( ! empty( $sink ) ) {
87
- unset( $buttons[ $sink ] );
88
- }
89
-
90
- // push our buttons to the end
91
- array_push( $buttons, 'bctt' );
92
-
93
- // now add back the sink
94
- if ( ! empty( $sink ) ) {
95
- $buttons[] = 'wp_adv';
96
- }
97
-
98
- // send them back
99
- return $buttons;
100
- }
101
-
102
- // end class
103
- }
104
-
105
- // end exists check
106
- }
107
-
108
- // Instantiate our class
109
- new BCTT_TinyMCE();
trunk/assets/tinymce/css/bctt-admin.css DELETED
@@ -1,18 +0,0 @@
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
- }
trunk/assets/tinymce/js/tinymce-bctt.js DELETED
@@ -1,71 +0,0 @@
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: editor.getLang( 'bctt.toolTip', 'Better Click To Tweet Shortcode Generator' ),
9
- icon: 'bctt-tweet',
10
- onclick: function() {
11
- // Open window
12
- editor.windowManager.open( {
13
- title: editor.getLang( 'bctt.windowTitle', 'Better Click To Tweet Shortcode Generator' ),
14
- body: [
15
- {
16
- type: 'textbox',
17
- name: 'tweet',
18
- label: editor.getLang( 'bctt.tweetableQuote', 'Tweetable Quote' ),
19
- multiline : true,
20
- minHeight : 60
21
- },
22
- {
23
- type: 'checkbox',
24
- checked: true,
25
- name: 'viamark',
26
- value: true,
27
- text: editor.getLang( 'bctt.viaExplainer', 'Add the username below to this tweet'),
28
- label: editor.getLang( 'bctt.viaPrompt', 'Include "via"?'),
29
- },
30
- {
31
- type: 'textbox',
32
- name: 'username',
33
- label: editor.getLang( 'bctt.usernameExplainer', 'Which Twitter username?'),
34
- multiline: false,
35
- value: editor.getLang( 'bctt.userPrePopulated', ''),
36
- }
37
- ],
38
- width: 800,
39
- height: 180,
40
- onsubmit: function( e ) {
41
-
42
- // bail without tweet text
43
- if ( e.data.tweet === '' ) {
44
- return;
45
- }
46
-
47
- // build my content
48
- var bcttBuild = '';
49
-
50
- // set initial
51
- bcttBuild += '[bctt tweet="' + e.data.tweet + '"';
52
-
53
- // check for via
54
- if ( e.data.viamark === false ) {
55
- bcttBuild += ' via="no"';
56
-
57
- } else {
58
- bcttBuild += ' username="' + e.data.username + '"';
59
- }
60
-
61
- // close it up
62
- bcttBuild += ']';
63
-
64
- // Insert content when the window form is submitted
65
- editor.insertContent( bcttBuild );
66
- }
67
- });
68
- }
69
- });
70
- });
71
- })();
trunk/assets/tinymce/languages/bctt-mce-locale.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- /**
3
- * This file dynamically creates MCE locales, based on .po/.mo files loaded in the plugin's translation folder.
4
- * It interfaces with the TinyMCE API using the tinyMCE.addI18n() function,
5
- * which adds a language pack to TinyMCE
6
- *
7
- * @var string $strings a JavaScript snippet to add another language pack to TinyMCE
8
- * @var string $mce_locale an ISO 639-1 formated string of the current language e.g. en, de...
9
- * @deprecated wp_tiny_mce() at wp-admin/includes/post.php (for versions prior WP 3.3)
10
- * @see _WP_Editors::editor_settings in wp-includes/class-wp-editor.php
11
- */
12
- $strings =
13
- 'tinyMCE.addI18n(
14
- "' . $mce_locale . '.bctt",
15
- {
16
- toolTip : "' . esc_js( _x( 'Better Click To Tweet Shortcode Generator', 'Text that shows on mouseover for visual editor button', 'better-click-to-tweet' ) ) . '",
17
- windowTitle : "' . esc_js( _x( 'Better Click To Tweet Shortcode Generator', 'Text for title of the popup box when creating tweetable quote in the visual editor', 'better-click-to-tweet' ) ) . '",
18
- tweetableQuote : "' . esc_js( _x( 'Tweetable Quote', 'Text for label on input box on popup box in visual editor', 'better-click-to-tweet' ) ) . '",
19
- viaExplainer : "' . esc_js( _x( 'Add the username below to this tweet', 'Text explaining the checkbox on the visual editor', 'better-click-to-tweet' ) ) . '",
20
- viaPrompt : "' . esc_js( _x( 'Include via?', 'Checkbox label in visual editor', 'better-click-to-tweet' ) ) . '",
21
- usernameExplainer : "' . esc_js( _x( 'Which Twitter username?', 'Help text for label in visual editor', 'better-click-to-tweet' ) ) . '",
22
- userPrePopulated : "' . esc_js( get_option( 'bctt-twitter-handle' ) ) . '",
23
- }
24
- );
25
- ';
trunk/bctt-i18n.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- add_action( 'plugins_loaded', 'bctt_load_textdomain' );
4
-
5
- function bctt_load_textdomain() {
6
- load_plugin_textdomain( 'better-click-to-tweet', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
7
- }
trunk/bctt_options.php DELETED
@@ -1,261 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
-
4
-
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
-
12
- // instantiate i18n encouragement module
13
- $bctt_i18n = new bctt_i18n(
14
- array(
15
- 'textdomain' => 'better-click-to-tweet',
16
- 'project_slug' => '/wp-plugins/better-click-to-tweet/stable',
17
- 'plugin_name' => 'Better Click To Tweet',
18
- 'hook' => 'bctt_settings_top',
19
- 'glotpress_url' => 'https://translate.wordpress.org/',
20
- 'glotpress_name' => 'Translating WordPress',
21
- 'glotpress_logo' => 'https://plugins.svn.wordpress.org/better-click-to-tweet/assets/icon-256x256.png',
22
- 'register_url ' => 'https://translate.wordpress.org/projects/wp-plugins/better-click-to-tweet/',
23
- )
24
- );
25
-
26
- // Add Settings Link
27
- add_action( 'admin_menu', 'bctt_admin_menu' );
28
-
29
-
30
- function bctt_admin_menu() {
31
- add_action( 'admin_init', 'bctt_register_settings', 100, 1 );
32
- add_menu_page( 'Better Click To Tweet Options', 'Better Click To Tweet', 'manage_options', 'better-click-to-tweet', null, 'dashicons-twitter' );
33
- add_submenu_page('better-click-to-tweet', 'Better Click To Tweet Main Settings', 'Settings', 'manage_options', 'better-click-to-tweet', 'bctt_settings_page' );
34
- }
35
-
36
- function bctt_register_settings() {
37
- register_setting( 'bctt_clicktotweet-options', 'bctt-twitter-handle', 'bctt_validate_settings' );
38
- register_setting( 'bctt_clicktotweet-options', 'bctt-short-url', 'bctt_validate_checkbox' );
39
- }
40
-
41
- function bctt_validate_settings( $input ) {
42
- return preg_replace('/[^0-9a-zA-Z_]/', '', $input);
43
- }
44
-
45
- function bctt_validate_checkbox( $input ) {
46
- if ( ! isset( $input ) || $input != '1' ) {
47
- return 0;
48
- } else {
49
- return 1;
50
- }
51
- }
52
-
53
- function bctt_add_custom_style_option() {
54
- $bctt_dequeued_with_custom_funtion = bctt_is_default_styles_dequeued();
55
-
56
- $bctt_custom_style = bctt_is_custom_stylesheet();
57
-
58
- if ( $bctt_dequeued_with_custom_funtion || $bctt_custom_style ) {
59
- return true;
60
- } else {
61
- return false;
62
- }
63
-
64
- }
65
-
66
- function bctt_admin_styles() {
67
- wp_register_style( 'bctt_admin_style', plugins_url( 'assets/css/bctt-admin.css', __FILE__ ) );
68
- wp_enqueue_style( 'bctt_admin_style' );
69
- }
70
-
71
- function bctt_settings_page() {
72
- if ( ! current_user_can( 'manage_options' ) ) {
73
- wp_die( __( 'You do not have sufficient permissions to access this page.', 'better-click-to-tweet' ) );
74
- }
75
-
76
- bctt_admin_styles();
77
- ?>
78
-
79
- <div class="wrap">
80
-
81
- <h1 class="wp-heading-inline"><?php /* translators: Treat "Better Click To Tweet" as a brand name, don't translate it */
82
- _e( 'Better Click To Tweet — a plugin by Ben Meredith', 'better-click-to-tweet' ); ?></h1>
83
-
84
- <hr/>
85
- <?php do_action( 'bctt_settings_top' ); ?>
86
-
87
-
88
- <div id="poststuff">
89
- <div id="post-body" class="metabox-holder columns-2 ">
90
- <div id="post-body-content" style="position: relative;">
91
- <div id="bctt_instructions" class="postbox ">
92
- <h2><?php _e( 'Instructions', 'better-click-to-tweet' ); ?></h2>
93
- <div class="inside">
94
-
95
- <p><?php /* translators: Treat "Better Click To Tweet" as a brand name, don't translate it */
96
- _e( 'To add styled click-to-tweet quote boxes include the Better Click To Tweet shortcode in your post.', 'better-click-to-tweet' ); ?></p>
97
-
98
- <p><?php _e( 'Here\'s how you format the shortcode:', 'better-click-to-tweet' ); ?></p>
99
- <pre>[bctt tweet="<?php /* translators: This text shows up as a sample tweet in the instructions for how to use the plugin. */
100
- _e( 'Meaningful, tweetable quote.', 'better-click-to-tweet' ); ?>"]</pre>
101
- <p><?php /* translators: Also, treat "BCTT" as a brand name, don't translate it */
102
- _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>
103
-
104
- <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>
105
- </div>
106
- <!--/inside-->
107
- </div>
108
- <!--/bctt_instructions-->
109
- <?php do_action( 'bctt_instructions_bottom' ); ?>
110
- <div class="postbox">
111
- <h2><?php _e( 'Settings', 'better-click-to-tweet' ); ?></h2>
112
- <div class="inside">
113
- <div class="main">
114
- <p><?php _e( 'Enter your Twitter handle to add "via @yourhandle" to your tweets. Do not include the @ symbol.', 'better-click-to-tweet' ); ?></p>
115
-
116
- <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>
117
-
118
- <form method="post" action="options.php" style="">
119
- <?php settings_fields( 'bctt_clicktotweet-options' ); ?>
120
-
121
- <table class="form-table">
122
- <tr valign="top">
123
- <th style="width: 200px;">
124
- <label for="bctt-twitter-handle"><?php _ex( 'Your Twitter Handle', 'label for text input on settings screen', 'better-click-to-tweet' ); ?></label>
125
- </th>
126
- <td><input id="bctt-twitter-handle" type="text" name="bctt-twitter-handle"
127
- value="<?php echo esc_attr( get_option( 'bctt-twitter-handle' ) ); ?>"/>
128
- </td>
129
- <tr valign="top">
130
- <th style="width: 200px;">
131
- <label for="bctt-short-url"><?php _ex( 'Use Short URL?', 'label for checkbox on settings screen', 'better-click-to-tweet' ); ?></label>
132
- </th>
133
- <td><input id="bctt-short-url" type="checkbox" name="bctt-short-url"
134
- value="1" <?php if ( 1 == get_option( 'bctt-short-url' ) ) {
135
- echo 'checked="checked"';
136
- } ?>" />
137
- </td>
138
- </tr>
139
-
140
- <?php if ( ! bctt_add_custom_style_option() ) { ?>
141
- <tr valign="top">
142
- <th style="width:200px;">
143
- <label><?php _ex( 'Use Premium Styles?', 'label for checkbox on settings screen', 'better-click-to-tweet' ); ?></label>
144
- </th>
145
- <td><input type="checkbox" name="bctt-custom-style"
146
- value="1" <?php if ( is_plugin_active( 'better-click-to-tweet-styles/better-click-to-tweet-premium-styles.php' ) ) {
147
- echo 'checked="checked"';
148
- } else {
149
- echo 'disabled="disabled"';
150
- } ?>" /> <span
151
- style="font-size: .85em;"><em> <?php if ( ! is_plugin_active( 'better-click-to-tweet-styles/better-click-to-tweet-premium-styles.php' ) ) {
152
- echo sprintf( __( 'Want Premium styles? Add the <a href=%s>Premium Styles add-on</a> today!', 'better-click-to-tweet' ), esc_url( 'http://benlikes.us/bcttpsdirect' ) );
153
- } ?></em></span>
154
-
155
- </td>
156
- </tr>
157
- <?php } ?>
158
- </table>
159
- <?php do_action( 'bctt_before_settings_submit' ); ?>
160
- <br class="clear"/>
161
-
162
- <p><input type="submit" class="button-primary"
163
- value="<?php _e( 'Save Changes', 'better-click-to-tweet' ); ?>"/>
164
- </p>
165
- <br class="clear"/>
166
- <em><?php $url = 'https://www.betterclicktotweet.com';
167
- $link = sprintf( __( 'An open source plugin by <a href=%s>Ben Meredith</a>', 'better-click-to-tweet' ), esc_url( $url ) );
168
- echo $link; ?></em>
169
- </form>
170
-
171
- </div>
172
- <!--/main-->
173
- </div>
174
- <!--/inside-->
175
- </div>
176
- <!--/postbox-->
177
- </div>
178
- <!--/post-body-content-->
179
- <?php do_action( 'bctt_after_settings' ); ?>
180
-
181
- <div id="post-box-container-1" class="post-box-container">
182
- <div id="side-sortables" class="meta-box-sortables ui-sortable">
183
-
184
- <div id="bctt-author" class="postbox " style="display:block;">
185
- <h2><?php _e( 'About the Author', 'better-click-to-tweet' ); ?> </h2>
186
-
187
- <div id="bctt_signup" class="inside">
188
- <form
189
- action="//benandjacq.us1.list-manage.com/subscribe/post?u=8f88921110b81f81744101f4d&amp;id=bd909b5f89"
190
- method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form"
191
- class="validate" target="_blank" novalidate>
192
- <div id="mc_embed_signup_scroll">
193
- <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( 'https://www.wpsteward.com' ), esc_url( 'https://www.wpsteward.com/service-plans' ) ); ?></p>
194
- <h3 class="bctt-signup"><?php _e( 'Sign up to receive my FREE web strategy guide', 'better-click-to-tweet' ); ?></h3>
195
-
196
- <p><label for="bctt-email-signup" class="hidden">
197
- Your Email Address
198
- </label>
199
- <input id="bctt-email-signup" type="email" value="" name="EMAIL" class="widefat" id="mce-EMAIL"
200
- placeholder="<?php _ex( 'Your Email Address', 'placeholder text for input field', 'better-click-to-tweet' ); ?>">
201
- <small><?php _e( 'No Spam. One-click unsubscribe in every message', 'better-click-to-tweet' ); ?></small>
202
- </p>
203
- <div style="position: absolute; left: -5000px;">
204
- <label for="bctt-mailchimp-subscribe-hidden" class="hidden">
205
- Hidden field for MailChimp verification
206
- </label>
207
- <input id="bctt-mailchimp-subscribe-hidden" type="text"
208
- name="b_8f88921110b81f81744101f4d_bd909b5f89"
209
- tabindex="-1" value="">
210
- </div>
211
- <p class="clear"><input type="submit" value="<?php _e( 'Subscribe', 'better-click-to-tweet' ); ?>" name="subscribe"
212
- id="mc-embedded-subscribe" class="button-secondary"></p>
213
-
214
- </div>
215
- <!--/mc_embed_signup_scroll-->
216
- </form>
217
- </div>
218
- <!--/bctt_signup-->
219
- <?php do_action( 'bctt_author_box_bottom' ); ?>
220
- </div>
221
- <!--/bctt-author-->
222
- </div>
223
- <!--/side-sortables-->
224
-
225
- <div id="side-sortables" class="meta-box-sortables ui-sortable">
226
- <div id="bctt-contrib" class="postbox">
227
- <div class="inside">
228
- <p><?php $url2 = 'https://github.com/Benunc/better-click-to-tweet';
229
- $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 ) );
230
- echo $link2; ?></p>
231
-
232
- <p><?php $url3 = 'https://www.wpsteward.com/donations/plugin-support/';
233
- $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 ) );
234
- echo $link3; ?>
235
- . <?php $url4 = 'https://wordpress.org/support/view/plugin-reviews/better-click-to-tweet';
236
- $link4 = sprintf( __( 'The second best way is to <a href=%s>leave an honest review.</a>', 'better-click-to-tweet' ), esc_url( $url4 ) );
237
- echo $link4; ?></p>
238
-
239
- <p><?php _e( 'Did this plugin save you enough time to be worth some money?', 'better-click-to-tweet' ); ?></p>
240
-
241
- <p>
242
- <a href="https://www.wpsteward.com/donations/plugin-support/"
243
- target="_blank"><?php _e( 'Click here to buy me a Coke to say thanks.', 'better-click-to-tweet' ); ?></a>
244
- </p>
245
- </div>
246
- <!--/inside-->
247
- </div>
248
- <!--/donate-contrib-->
249
- <?php do_action( 'bctt_contrib_bottom' ); ?>
250
- </div>
251
- <!--side-sortables-->
252
- </div>
253
- <!--/post-box-container-1-->
254
- </div>
255
- <!--/post-body-->
256
- </div>
257
- <!--/wrap-->
258
- <?php
259
- }
260
-
261
-
trunk/better-click-to-tweet.php DELETED
@@ -1,348 +0,0 @@
1
- <?php
2
- /**
3
- * Plugin Name: Better Click To Tweet
4
- * Description: Add Click to Tweet boxes simply and elegantly to your posts or pages. All the features of a premium plugin, for FREE!
5
- * Version: 5.6.1
6
- * Author: Ben Meredith
7
- * Author URI: https://www.betterclicktotweet.com
8
- * Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
9
- * License: GPL2
10
- * Text Domain: better-click-to-tweet
11
- **/
12
-
13
- defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
14
-
15
- include 'i18n-module.php';
16
- include 'bctt_options.php';
17
- include 'bctt-i18n.php';
18
- include 'admin-nags.php';
19
-
20
- /*
21
- * Strips the html, shortens the text (after checking for mb_internal_encoding compatibility)
22
- * and adds an ellipsis if the text has been shortened
23
- *
24
- * @param string $input raw text string from the shortcode
25
- * @param int $length length for truncation
26
- * @param bool $ellipsis boolean for whether the text has been truncated
27
- * @param bool $strip_html ensures that html is stripped from text string
28
- */
29
-
30
-
31
- function bctt_shorten( $input, $length, $ellipsis = true, $strip_html = true ) {
32
-
33
- if ( $strip_html ) {
34
- $input = strip_tags( $input );
35
- }
36
-
37
- /*
38
- * Checks to see if the mbstring php extension is loaded, for optimal truncation.
39
- * If it's not, it bails and counts the characters based on utf-8.
40
- * What this means for users is that non-Roman characters will only be counted
41
- * correctly if that extension is loaded. Contact your server admin to enable the extension.
42
- */
43
-
44
- if ( function_exists( 'mb_internal_encoding' ) ) {
45
- if ( mb_strlen( $input ) <= $length ) {
46
- return $input;
47
- }
48
-
49
- $last_space = mb_strrpos( mb_substr( $input, 0, $length ), ' ' );
50
- $trimmed_text = mb_substr( $input, 0, $last_space );
51
-
52
- if ( $ellipsis ) {
53
- $trimmed_text .= "…";
54
- }
55
-
56
- return $trimmed_text;
57
-
58
- } else {
59
-
60
- if ( strlen( $input ) <= $length ) {
61
- return $input;
62
- }
63
-
64
- $last_space = strrpos( substr( $input, 0, $length ), ' ' );
65
- $trimmed_text = substr( $input, 0, $last_space );
66
-
67
- if ( $ellipsis ) {
68
- $trimmed_text .= "…";
69
- }
70
-
71
- return $trimmed_text;
72
- }
73
- }
74
-
75
- ;
76
-
77
- /*
78
- * Creates the bctt shortcode
79
- *
80
- * @since 0.1
81
- * @param array $atts an array of shortcode attributes
82
- *
83
- */
84
-
85
- function bctt_shortcode( $atts ) {
86
-
87
- $atts = shortcode_atts( apply_filters( 'bctt_atts', array(
88
- 'tweet' => '',
89
- 'via' => 'yes',
90
- 'username' => 'not-a-real-user',
91
- 'url' => 'yes',
92
- 'nofollow' => 'no',
93
- 'prompt' => sprintf( _x( 'Click To Tweet', 'Text for the box on the reader-facing box', 'better-click-to-tweet' ) )
94
- ) ), $atts, 'bctt' );
95
-
96
- //since 4.7: adds option to add in a per-box username to the tweet
97
- if ( $atts['username'] != 'not-a-real-user' ) {
98
-
99
- $handle = $atts['username'];
100
-
101
- } else {
102
-
103
- $handle = get_option( 'bctt-twitter-handle' );
104
-
105
- }
106
-
107
- if ( function_exists( 'mb_internal_encoding' ) ) {
108
-
109
- $handle_length = ( 6 + mb_strlen( $handle ) );
110
-
111
- } else {
112
-
113
- $handle_length = ( 6 + strlen( $handle ) );
114
-
115
- }
116
-
117
- if ( ! empty( $handle ) && $atts['via'] != 'no' ) {
118
-
119
- $via = $handle;
120
- $related = $handle;
121
- } else {
122
-
123
- $via = null;
124
- $related = '';
125
-
126
- }
127
-
128
- if ( $atts['via'] != 'yes' ) {
129
- $via = null;
130
- $handle_length = 0;
131
-
132
- }
133
-
134
- $text = $atts['tweet'];
135
-
136
- if ( filter_var( $atts['url'], FILTER_VALIDATE_URL ) ) {
137
-
138
- $bcttURL = $atts['url'];
139
-
140
- } elseif ( $atts['url'] != 'no' ) {
141
-
142
- if ( get_option( 'bctt-short-url' ) != false ) {
143
-
144
- $bcttURL = wp_get_shortlink();
145
-
146
- } else {
147
-
148
- $bcttURL = get_permalink();
149
-
150
- }
151
-
152
- } else {
153
-
154
- $bcttURL = null;
155
-
156
- }
157
-
158
- if ( $atts['url'] != 'no' ) {
159
-
160
- $short = bctt_shorten( $text, ( 253 - ( $handle_length ) ) );
161
-
162
- } else {
163
-
164
- $short = bctt_shorten( $text, ( 280 - ( $handle_length ) ) );
165
-
166
- }
167
-
168
- if ( $atts['nofollow'] != 'no' ) {
169
-
170
- $rel = 'rel="noopener noreferrer nofollow"';
171
-
172
- } else {
173
-
174
- $rel = 'rel="noopener noreferrer"';
175
-
176
- }
177
-
178
- $bctt_span_class = apply_filters( 'bctt_span_class', 'bctt-click-to-tweet' );
179
- $bctt_text_span_class = apply_filters( 'bctt_text_span_class', 'bctt-ctt-text' );
180
- $bctt_button_span_class = apply_filters( 'bctt_button_span_class', 'bctt-ctt-btn' );
181
-
182
-
183
- $href = add_query_arg( array(
184
- 'url' => $bcttURL,
185
- 'text' => rawurlencode( html_entity_decode( $short ) ),
186
- 'via' => $via,
187
- 'related' => $related,
188
- ), 'https://twitter.com/intent/tweet' );
189
-
190
- if ( ! is_feed() ) {
191
-
192
- $output = "<span class='" . esc_attr( $bctt_span_class ) . "'><span class='" . esc_attr( $bctt_text_span_class ) . "'><a href='" . esc_url( $href ) . "' target='_blank'" . $rel . ">" . esc_html( $short ) . " </a></span><a href='" . esc_url( $href ) . "' target='_blank' class='" . esc_attr( $bctt_button_span_class ) . "'" . $rel . ">" . esc_html( $atts['prompt'] ) . "</a></span>";
193
- } else {
194
-
195
- $output = "<hr /><p><em>" . esc_html( $short ) . "</em><br /><a href='" . esc_url( $href ) . "' target='_blank' " . $rel . " >" . esc_html( $atts['prompt'] ) . "</a><br /><hr />";
196
-
197
- }
198
- return apply_filters( 'bctt_output', $output, $short, $bctt_button_span_class, $bctt_span_class, $bctt_text_span_class, $href, $rel, $atts );
199
- }
200
-
201
- add_shortcode( 'bctt', 'bctt_shortcode' );
202
-
203
- /*
204
- * Load the stylesheet to style the output.
205
- *
206
- * As of v4.1, defaults to a custom stylesheet
207
- * located in the root of the uploads folder at wp-content/uploads/bcttstyle.css and falls
208
- * back to the stylesheet bundled with the plugin if the custom sheet is not present.
209
- *
210
- * @since 0.1
211
- *
212
- */
213
-
214
- function bctt_scripts() {
215
-
216
- if ( bctt_is_default_styles_dequeued() ) {
217
- foreach ( wp_load_alloptions() as $option => $value ) {
218
- if ( strpos( $option, 'bcct_' ) === 0 ) {
219
- delete_option( $option );
220
- }
221
- }
222
-
223
- return;
224
- }
225
-
226
- $custom = bctt_is_custom_stylesheet();
227
-
228
- $tag = $custom ? 'bcct_custom_style' : 'bcct_style';
229
- $location = bctt_get_stylesheet_url();
230
-
231
- $version = $custom ? '1.0' : '3.0';
232
-
233
- wp_register_style( $tag, $location, false, $version, 'all' );
234
-
235
- wp_enqueue_style( $tag );
236
- }
237
-
238
-
239
- add_action( 'wp_enqueue_scripts', 'bctt_scripts', 10 );
240
-
241
- /**
242
- * Check if default stylesheet must not be enqueued
243
- *
244
- * @return bool
245
- */
246
- function bctt_is_default_styles_dequeued() {
247
- return (bool) get_option( 'bctt_disable_css' );
248
- }
249
-
250
-
251
- /**
252
- * Check if there's a custo stylesheet that will be enqueued
253
- */
254
- function bctt_is_custom_stylesheet() {
255
- return file_exists( bctt_get_custom_styles_path() );
256
- }
257
-
258
- /**
259
- * Return the BCTT stylesheet URL
260
- *
261
- * Return custom styles URL if the file exists or the default one otherwise
262
- *
263
- * @return string
264
- */
265
- function bctt_get_stylesheet_url() {
266
- return bctt_is_custom_stylesheet() ? bctt_get_custom_styles_url() : bctt_get_styles_url();
267
- }
268
-
269
-
270
- /**
271
- * Return the custom stylesheet path
272
- *
273
- * @return string
274
- */
275
- function bctt_get_custom_styles_path() {
276
- $dir = wp_upload_dir();
277
- return $dir['basedir'] . '/bcttstyle.css';
278
- }
279
-
280
- /**
281
- * Return the custom stylesheet URL
282
- *
283
- * @return string
284
- */
285
- function bctt_get_custom_styles_url() {
286
- $dir = wp_upload_dir();
287
- return $dir['baseurl'] . '/bcttstyle.css';
288
- }
289
-
290
- /**
291
- * Return the default stylesheet path
292
- *
293
- * @return string
294
- */
295
- function bctt_get_styles_url() {
296
- return plugins_url( 'assets/css/styles.css', __FILE__ );
297
- }
298
-
299
- /*
300
- * Delete options and shortcode on uninstall
301
- *
302
- * @since 0.1
303
- */
304
-
305
- function bctt_on_uninstall() {
306
-
307
- delete_option( 'bctt-twitter-handle' );
308
-
309
- delete_option( 'bctt-short-url' );
310
-
311
- delete_option( 'bctt_disable_css' );
312
-
313
- delete_option( 'bctt_style_enqueued' );
314
-
315
- remove_shortcode( 'bctt' );
316
-
317
- delete_metadata( 'user', 0, 'bctt_has_dismissed_nag', '', true );
318
-
319
-
320
- }
321
-
322
-
323
-
324
- register_uninstall_hook( __FILE__, 'bctt_on_uninstall' );
325
-
326
- function bctt_options_link( $links ) {
327
-
328
- $settingsText = sprintf( _x( 'Settings', 'text for the link on the plugins page', 'better-click-to-tweet' ) );
329
-
330
- $settings_link = '<a href="admin.php?page=better-click-to-tweet">' . esc_html( $settingsText ) . '</a>';
331
-
332
- array_unshift( $links, $settings_link );
333
-
334
- return $links;
335
-
336
- }
337
-
338
- $bcttlink = plugin_basename( __FILE__ );
339
- add_filter( "plugin_action_links_$bcttlink", 'bctt_options_link' );
340
-
341
- /**
342
- * Register Block
343
- */
344
- add_action( 'plugins_loaded', function () {
345
- if ( function_exists( 'register_block_type' ) ) {
346
- require_once( plugin_dir_path( __FILE__ ) . 'assets/block/init.php' );
347
- }
348
- } );
trunk/i18n-module.php DELETED
@@ -1,280 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This class defines a promo box and checks your translation site's API for stats about it, then shows them to the user.
5
- */
6
- class bctt_i18n {
7
-
8
- /**
9
- * Your translation site's logo
10
- *
11
- * @var string
12
- */
13
- private $glotpress_logo;
14
-
15
- /**
16
- * Your translation site's name
17
- *
18
- * @var string
19
- */
20
- private $glotpress_name;
21
-
22
- /**
23
- * Your translation site's URL
24
- *
25
- * @var string
26
- */
27
- private $glotpress_url;
28
-
29
- /**
30
- * Hook where you want to show the promo box
31
- *
32
- * @var string
33
- */
34
- private $hook;
35
-
36
- /**
37
- * Will contain the site's locale
38
- *
39
- * @access private
40
- * @var string
41
- */
42
- private $locale;
43
-
44
- /**
45
- * Will contain the locale's name, obtained from yoru translation site
46
- *
47
- * @access private
48
- * @var string
49
- */
50
- private $locale_name;
51
-
52
- /**
53
- * Will contain the percentage translated for the plugin translation project in the locale
54
- *
55
- * @access private
56
- * @var int
57
- */
58
- private $percent_translated;
59
-
60
- /**
61
- * Name of your plugin
62
- *
63
- * @var string
64
- */
65
- private $plugin_name;
66
-
67
- /**
68
- * Project slug for the project on your translation site
69
- *
70
- * @var string
71
- */
72
- private $project_slug;
73
-
74
- /**
75
- * URL to point to for registration links
76
- *
77
- * @var string
78
- */
79
- private $register_url;
80
-
81
- /**
82
- * Your plugins textdomain
83
- *
84
- * @var string
85
- */
86
- private $textdomain;
87
-
88
- /**
89
- * Indicates whether there's a translation available at all.
90
- *
91
- * @access private
92
- * @var bool
93
- */
94
- private $translation_exists;
95
-
96
- /**
97
- * Indicates whether the translation's loaded.
98
- *
99
- * @access private
100
- * @var bool
101
- */
102
- private $translation_loaded;
103
-
104
- /**
105
- * Class constructor
106
- *
107
- * @param array $args Contains the settings for the class.
108
- */
109
- public function __construct( $args ) {
110
- if ( ! is_admin() ) {
111
- return;
112
- }
113
-
114
- $this->locale = get_locale();
115
- if ( 'en_US' === $this->locale ) {
116
- return;
117
- }
118
-
119
- $this->init( $args );
120
-
121
- if ( ! $this->hide_promo() ) {
122
- add_action( $this->hook, array( $this, 'promo' ) );
123
- }
124
- }
125
-
126
- /**
127
- * This is where you decide where to display the messages and where you set the plugin specific variables.
128
- *
129
- * @access private
130
- *
131
- * @param array $args
132
- */
133
- private function init( $args ) {
134
- foreach ( $args as $key => $arg ) {
135
- $this->$key = $arg;
136
- }
137
- }
138
-
139
- /**
140
- * Check whether the promo should be hidden or not
141
- *
142
- * @access private
143
- *
144
- * @return bool
145
- */
146
- private function hide_promo() {
147
- $hide_promo = get_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide' );
148
- if ( ! $hide_promo ) {
149
- if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_VALIDATE_INT ) === 1 ) {
150
- // No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
151
- set_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide', true );
152
- $hide_promo = true;
153
- }
154
- }
155
-
156
- return $hide_promo;
157
- }
158
-
159
- /**
160
- * Generates a promo message
161
- *
162
- * @access private
163
- *
164
- * @return bool|string $message
165
- */
166
- private function promo_message() {
167
- $message = false;
168
-
169
- if ( $this->translation_exists && $this->translation_loaded && $this->percent_translated < 90 ) {
170
- $message = __( 'As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help complete the translation to %1$s!', 'better-click-to-tweet' );
171
- } else if ( ! $this->translation_loaded && $this->translation_exists ) {
172
- $message = __( 'You\'re using WordPress in %1$s. While %2$s has been translated to %1$s for %3$d%%, it\'s not been shipped with the plugin yet. You can help! Register at %4$s to help complete the translation to %1$s!', 'better-click-to-tweet' );
173
- } else if ( ! $this->translation_exists ) {
174
- $message = __( 'You\'re using WordPress in a language we don\'t support yet. We\'d love for %2$s to be translated in that language too, but unfortunately, it isn\'t right now. You can change that! Register at %4$s to help translate it!', 'better-click-to-tweet' );
175
- }
176
-
177
- $registration_link = sprintf( '<a href="https://translate.wordpress.org/projects/wp-plugins/better-click-to-tweet/">%1$s</a>', esc_html( $this->glotpress_name ) );
178
- $message = sprintf( $message, esc_html( $this->locale_name ), esc_html( $this->plugin_name ), $this->percent_translated, $registration_link );
179
-
180
- return $message;
181
- }
182
-
183
- /**
184
- * Outputs a promo box
185
- */
186
- public function promo() {
187
- $this->translation_details();
188
-
189
- $message = $this->promo_message();
190
-
191
- if ( $message ) {
192
- echo '<div id="i18n_promo_box" style="border:1px solid #ccc;background-color:#fff;padding:1em 2em;max-width:100%;min-height:220px;">';
193
- echo '<a href="' . esc_url( add_query_arg( array( 'remove_i18n_promo' => '1' ) ) ) . '" style="color:#333;text-decoration:none;font-weight:bold;font-size:16px;border:1px solid #ccc;padding:1px 4px;" class="alignright">X</a>';
194
- if ( isset( $this->glotpress_logo ) && '' != $this->glotpress_logo ) {
195
- echo '<a href="https://translate.wordpress.org/projects/wp-plugins/better-click-to-tweet/"><img style="float: right;margin: 15px 5px 5px 5px;padding: 0 1em;width: 200px;" src="' . esc_url( $this->glotpress_logo ) . '" alt="' . esc_attr( $this->glotpress_name ) . '"/></a>';
196
- }
197
- echo '<h2>' . sprintf( __( 'Translation of %s', 'better-click-to-tweet' ), esc_html( $this->plugin_name ) ) . '</h2>';
198
-
199
- echo '<p>' . esc_html( $message ) . '</p>';
200
- echo '<p><a href="https://translate.wordpress.org/projects/wp-plugins/better-click-to-tweet/">' . __( 'Register now &raquo;', 'better-click-to-tweet' ) . '</a></p>';
201
- echo '</div>';
202
- }
203
- }
204
-
205
- /**
206
- * Try to find the transient for the translation set or retrieve them.
207
- *
208
- * @access private
209
- *
210
- * @return object|null
211
- */
212
- private function find_or_initialize_translation_details() {
213
- $set = get_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale );
214
-
215
- if ( ! $set ) {
216
- $set = $this->retrieve_translation_details();
217
- set_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale, $set, DAY_IN_SECONDS );
218
- }
219
-
220
- return $set;
221
- }
222
-
223
- /**
224
- * Try to get translation details from cache, otherwise retrieve them, then parse them.
225
- *
226
- * @access private
227
- */
228
- private function translation_details() {
229
- $set = $this->find_or_initialize_translation_details();
230
-
231
- $this->translation_exists = ! is_null( $set );
232
- $this->translation_loaded = is_textdomain_loaded( 'better-click-to-tweet' );
233
-
234
- $this->parse_translation_set( $set );
235
- }
236
-
237
- /**
238
- * Retrieve the translation details from Yoast Translate
239
- *
240
- * @access private
241
- *
242
- * @return object|null
243
- */
244
- private function retrieve_translation_details() {
245
- $api_url = trailingslashit( $this->glotpress_url ) . 'api/projects/' . $this->project_slug;
246
-
247
- $resp = wp_remote_get( $api_url );
248
- $body = wp_remote_retrieve_body( $resp );
249
- unset( $resp );
250
-
251
- if ( $body ) {
252
- $body = json_decode( $body );
253
- foreach ( $body->translation_sets as $set ) {
254
- if ( $this->locale == $set->wp_locale ) {
255
- return $set;
256
- }
257
- }
258
- }
259
-
260
- return null;
261
- }
262
-
263
- /**
264
- * Set the needed private variables based on the results from Yoast Translate
265
- *
266
- * @param object $set The translation set
267
- *
268
- * @access private
269
- */
270
- private function parse_translation_set( $set ) {
271
- if ( $this->translation_exists && is_object( $set ) ) {
272
- $this->locale_name = $set->name;
273
- $this->percent_translated = $set->percent_translated;
274
- } else {
275
- $this->locale_name = '';
276
- $this->percent_translated = '';
277
- }
278
- }
279
-
280
- }
trunk/languages/better-click-to-tweet-de_DE.mo DELETED
Binary file
trunk/languages/better-click-to-tweet-de_DE.po DELETED
@@ -1,199 +0,0 @@
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-"
7
- "tweet\n"
8
- "POT-Creation-Date: 2015-07-05 08:56+0200\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2015-07-05 09:46+0200\n"
13
- "Last-Translator: Christian Zumbrunnen <chzumbrunnen@gmx.ch>\n"
14
- "Language-Team: \n"
15
- "X-Generator: Poedit 1.8.2\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- "Language: de_DE\n"
18
-
19
- #: bctt_options.php:40
20
- msgid "You do not have sufficient permissions to access this page."
21
- msgstr ""
22
- "Du hast nicht die erforderlichen Rechte, um auf diese Seite zuzugreifen."
23
-
24
- #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
25
- #. it
26
- #: bctt_options.php:45
27
- msgid "Better Click To Tweet — a plugin by Ben Meredith"
28
- msgstr "Better Click To Tweet — ein Plugin von Ben Meredith"
29
-
30
- #: bctt_options.php:53
31
- msgid "About the Author"
32
- msgstr "Über den Autor"
33
-
34
- #: bctt_options.php:57
35
- msgid ""
36
- "This plugin is developed by <a href=\"%s\">Ben Meredith</a>. I am a "
37
- "freelance developer specializing in <a href=\"%s\">outrunning and "
38
- "outsmarting hackers</a>."
39
- msgstr ""
40
- "Dieses Plugin wurde vony <a href=\"%s\">Ben Meredith</a> entwickelt. Ich bin "
41
- "ein Freelance Entwickler welcher sich darauf spezialisisert hat <a href=\"%s"
42
- "\">Hacker zu übertreffen und überlisten</a>."
43
-
44
- #: bctt_options.php:58
45
- msgid "Sign up to receive my FREE web strategy guide"
46
- msgstr "Melde dich an um meinen kostenlosen Web Strategie Führer zu erhalten"
47
-
48
- #: bctt_options.php:59
49
- msgctxt "placeholder text for input field"
50
- msgid "Your Email Address"
51
- msgstr "Deine E-Mail Adresse"
52
-
53
- #: bctt_options.php:60
54
- msgid "No Spam. One-click unsubscribe in every message"
55
- msgstr "Kein Spam. Ein-Klick Abmeldung in jedem E-Mail."
56
-
57
- #: bctt_options.php:74
58
- msgid ""
59
- "Are you a developer? I would love your help making this plugin better. Check "
60
- "out the <a href=%s>plugin on Github.</a>"
61
- msgstr ""
62
- "Bist du ein Entwickler? Ich schätze deine Unterstützung beim Verbessern "
63
- "dieses Plugins. Beachte dieses <a href=%s>Plugin auf Github.</a>"
64
-
65
- #: bctt_options.php:75
66
- msgid ""
67
- "The best way you can support this and other plugins is to <a href=%s>donate</"
68
- "a>"
69
- msgstr ""
70
- "Die beste Möglichkeit dieses und andere Plugins zu unterstützen, ist es zu "
71
- "<a href=%s>spenden</a>"
72
-
73
- #: bctt_options.php:75
74
- msgid "The second best way is to <a href=%s>leave an honest review.</a>"
75
- msgstr ""
76
- "Die zweitbeste Möglichkeit ist es <a href=%s>eine ehrliche Bewertung zu "
77
- "hinterlassen.</a>"
78
-
79
- #: bctt_options.php:76
80
- msgid "Did this plugin save you enough time to be worth some money?"
81
- msgstr ""
82
- "Hat dir dieses Plugin genug Zeitersparnis gebracht, dass du dafür etwas "
83
- "zahlen möchtest?"
84
-
85
- #: bctt_options.php:77
86
- msgid "Click here to buy me a Coke to say thanks."
87
- msgstr "Klicke hier um mir eine Cola zu kaufen um Danke zu sagen."
88
-
89
- #: bctt_options.php:87
90
- msgid "Instructions"
91
- msgstr "Anleitung"
92
-
93
- #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
94
- #. it
95
- #: bctt_options.php:88
96
- msgid ""
97
- "To add styled click-to-tweet quote boxes include the Better Click To Tweet "
98
- "shortcode in your post."
99
- msgstr ""
100
- "Um gestylte Klick-To-Tweet Boxen zu verwenden, nutze den Better Click To "
101
- "Tweet Kurzcode in deinem Beitrag."
102
-
103
- #: bctt_options.php:89
104
- msgid "Here's how you format the shortcode:"
105
- msgstr "So kannst du den Kurzcode nutzen:"
106
-
107
- #. translators: This text shows up as a sample tweet in the instructions for
108
- #. how to use the plugin.
109
- #: bctt_options.php:89
110
- msgid "Meaningful, tweetable quote."
111
- msgstr "Bedeutungsvolles, tweetbares Zitat."
112
-
113
- #. translators: Also, treat "BCTT" as a brand name, don't translate it
114
- #: bctt_options.php:90
115
- msgid ""
116
- "If you are using the visual editor, click the BCTT birdie in the toolbar to "
117
- "add a pre-formatted shortcode to your post."
118
- msgstr ""
119
- "Wenn du den Visuellen Editor nutzt, klicke auf das BCTT-Vögelchen in der "
120
- "Werkzeugleiste um einen vorformatierten Kurzcode einzufügen."
121
-
122
- #: bctt_options.php:91
123
- msgid ""
124
- "Tweet length is automatically shortened to 117 characters minus the length "
125
- "of your twitter name, to leave room for it and a link back to the post."
126
- msgstr ""
127
- "Die Länge des Tweets wird automatisch auf 117 Zeichen minus der Länge deines "
128
- "Twitter Namen gekürzt um Platz für den Text inklusive Link zum Beitrag zu "
129
- "haben."
130
-
131
- #: bctt_options.php:96
132
- msgid "Settings"
133
- msgstr "Einstellungen"
134
-
135
- #: bctt_options.php:97
136
- msgid ""
137
- "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
138
- "include the @ symbol."
139
- msgstr ""
140
- "Gib deinen Twitter Namen ein um deinen Tweets ein “via @Twittername” "
141
- "anzufügen. (Ohne @ Symbol)."
142
-
143
- #: bctt_options.php:98
144
- msgid ""
145
- "Checking the box below will force the plugin to show the WordPress shortlink "
146
- "in place of the full URL. While this does not impact tweet character length, "
147
- "it is useful alongside plugins which customize the WordPress shortlink using "
148
- "services like bit.ly or yourls.org for tracking"
149
- msgstr ""
150
- "Ankreuzen der Checkbox bewirkt, dass anstelle der vollen URL der WordPress "
151
- "Kurzlink angezeigt wird. Dies hat keine Auswirkung auf die Tweetlänge ist "
152
- "aber nützlich im Zusammenspiel mit Diensten, wie bit.ly oder yourls.org "
153
- "welche den Kurzlink zum Tracken verwenden."
154
-
155
- #: bctt_options.php:104
156
- msgctxt "label for text input on settings screen"
157
- msgid "Your Twitter Handle"
158
- msgstr "Dein Twitter Name"
159
-
160
- #: bctt_options.php:107
161
- msgctxt "label for checkbox on settings screen"
162
- msgid "Use Short URL?"
163
- msgstr "Kurzlink verwenden?"
164
-
165
- #: bctt_options.php:112
166
- msgid "Save Changes"
167
- msgstr "Änderungen speichern"
168
-
169
- #: bctt_options.php:114
170
- msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
171
- msgstr "Ein Open Source Plugin von <a href=%s>Ben Meredith</a>"
172
-
173
- #: better-click-to-tweet.php:138
174
- msgctxt "Text for the box on the reader-facing box"
175
- msgid "Click To Tweet"
176
- msgstr "Klick um zu Tweeten"
177
-
178
- #: better-click-to-tweet.php:209
179
- msgctxt "text for the link on the plugins page"
180
- msgid "Settings"
181
- msgstr "Einstellungen"
182
-
183
- #. Plugin Name of the plugin/theme
184
- msgid "Better Click To Tweet"
185
- msgstr "Better Click To Tweet"
186
-
187
- #. Description of the plugin/theme
188
- msgid ""
189
- "The only Click To Tweet plugin to add translation support. The only Click To "
190
- "Tweet plugin to take into account your Twitter username's length in "
191
- "truncating long tweets, or to correctly take into account non-Roman "
192
- "characters. Simply put, as Click To Tweet plugins go, this one is, well, "
193
- "BETTER."
194
- msgstr ""
195
- "Das einzige Klick-um-zu-tweeten Plugin mit Unterstützung für Übersetzung. "
196
- "Das einzige Klick-um-zu-tweeten Plugin welches die Länge deines Twitter "
197
- "Namens beim Kürzen von langen Tweets berücksichtigt sowie nicht-lateinische "
198
- "Zeichen korrekt behandelt. Einfach gesagt, was Klick-um-zu-tweeten Plugins "
199
- "betrifft ist dieses - nun BESSER."
trunk/languages/better-click-to-tweet-el.mo DELETED
Binary file
trunk/languages/better-click-to-tweet-el.po DELETED
@@ -1,230 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Better Click To Tweet\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-07-13 14:15-0400\n"
6
- "PO-Revision-Date: Fri Oct 30 2015 21:42:46 GMT+0200 (GTB Standard Time)\n"
7
- "Last-Translator: ΠΑΝΑΓΙΩΤΗΣ ΣΑΚΑΛΑΚΗΣ <meymigrou@outlook.com>\n"
8
- "Language-Team: \n"
9
- "Language: Greek\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-Basepath: ..\n"
17
- "X-Poedit-WPHeader: better-click-to-tweet.php\n"
18
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
19
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
20
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
21
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
22
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
- "X-Poedit-SearchPathExcluded-0: *.js\n"
25
- "X-Loco-Target-Locale: el_GR"
26
-
27
- #: assets/tinymce/languages/bctt-mce-locale.php:12
28
- msgctxt "Text that shows on mouseover for visual editor button"
29
- msgid "Better Click To Tweet Shortcode Generator"
30
- msgstr "Δημιουργία Shortcode"
31
-
32
- #: assets/tinymce/languages/bctt-mce-locale.php:13
33
- msgctxt ""
34
- "Text for title of the popup box when creating tweetable quote in the visual "
35
- "editor"
36
- msgid "Better Click To Tweet Shortcode Generator"
37
- msgstr "Δημιουργία Shortcode"
38
-
39
- #: assets/tinymce/languages/bctt-mce-locale.php:14
40
- msgctxt "Text for label on input box on popup box in visual editor"
41
- msgid "Tweetable Quote"
42
- msgstr "Tweetable Quote"
43
-
44
- #: assets/tinymce/languages/bctt-mce-locale.php:15
45
- msgctxt "Text explaining the checkbox on the visual editor"
46
- msgid "Add via @YourTwitterName to this tweet"
47
- msgstr "Πρόσθεσε το 'via @ΤοTwitterΌνομαΣου' σε αυτό το tweet"
48
-
49
- #: assets/tinymce/languages/bctt-mce-locale.php:16
50
- msgctxt "Checkbox label in visual editor"
51
- msgid "Include via?"
52
- msgstr "Προσθήκη του 'via';"
53
-
54
- #: bctt_options.php:40
55
- msgid "You do not have sufficient permissions to access this page."
56
- msgstr "Δεν έχετε επαρκή δικαιώματα για να δείτε αυτή τη σελίδα."
57
-
58
- #. translators: Treat "Better Click To Tweet" as a brand name, don't translate it
59
- #: bctt_options.php:45
60
- msgid "Better Click To Tweet — a plugin by Ben Meredith"
61
- msgstr "Better Click To Tweet — Ένα πρόσθετο από τον Ben Meredith"
62
-
63
- #: bctt_options.php:53
64
- msgid "About the Author"
65
- msgstr "Σχετικά με τον δημιουργό"
66
-
67
- #: bctt_options.php:57
68
- #, php-format
69
- msgid ""
70
- "This plugin is developed by <a href=\"%s\">Ben Meredith</a>. I am a freelance "
71
- "developer specializing in <a href=\"%s\">outrunning and outsmarting "
72
- "hackers</a>."
73
- msgstr ""
74
- "Το πρόσθετο δημιουργήθηκε από τον <a href=\"%s\">Ben Meredith</a>. Είμαι "
75
- "ελεύθερος επαγγελματίας προγραμματιστής που ειδικεύομαι στο να αποτρέπω και "
76
- "να ξεγελώ hackers."
77
-
78
- #: bctt_options.php:58
79
- msgid "Sign up to receive my FREE web strategy guide"
80
- msgstr "Κάνε εγγραφή για να λάβεις ΔΩΡΕΑΝ τον οδηγό στρατηγικής μου"
81
-
82
- #: bctt_options.php:59
83
- msgctxt "placeholder text for input field"
84
- msgid "Your Email Address"
85
- msgstr "Το e-mail σας"
86
-
87
- #: bctt_options.php:60
88
- msgid "No Spam. One-click unsubscribe in every message"
89
- msgstr "Χωρίς spam. Μπορείτε να καταργήσετε την εγγραφή σας όποτε θέλετε."
90
-
91
- #: bctt_options.php:74
92
- #, php-format
93
- msgid ""
94
- "Are you a developer? I would love your help making this plugin better. Check "
95
- "out the <a href=%s>plugin on Github.</a>"
96
- msgstr ""
97
- "Είσαι προγραμματιστής; Θα ήθελα την βοήθεια σου για να κάνω αυτό το πρόσθετο "
98
- "ακόμη καλύτερο. Δες το <a href=%s>πρόσθετο στο Github.</a>"
99
-
100
- #: bctt_options.php:75
101
- #, php-format
102
- msgid ""
103
- "The best way you can support this and other plugins is to <a "
104
- "href=%s>donate</a>"
105
- msgstr ""
106
- "Ο καλύτερος τρόπος για να υποστηρίξεις αυτό το πρόσθετο ή άλλα είναι να <a "
107
- "href=%s>δωρίσεις (donate).</a>"
108
-
109
- #: bctt_options.php:75
110
- #, php-format
111
- msgid "The second best way is to <a href=%s>leave an honest review.</a>"
112
- msgstr "Ο δεύτερος καλύτερος τρόπος είναι να γράψεις μια ειλικρινή αξιολόγηση."
113
-
114
- #: bctt_options.php:76
115
- msgid "Did this plugin save you enough time to be worth some money?"
116
- msgstr "Μήπως σε βοήθησε αυτό το πρόσθετο να γλυτώσεις χρόνο και χρήματα;"
117
-
118
- #: bctt_options.php:77
119
- msgid "Click here to buy me a Coke to say thanks."
120
- msgstr "Κάνε κλικ εδώ και κέρνα με ένα καφέ για ευχαριστώ."
121
-
122
- #: bctt_options.php:87
123
- msgid "Instructions"
124
- msgstr "Οδηγίες"
125
-
126
- #. translators: Treat "Better Click To Tweet" as a brand name, don't translate it
127
- #: bctt_options.php:88
128
- msgid ""
129
- "To add styled click-to-tweet quote boxes include the Better Click To Tweet "
130
- "shortcode in your post."
131
- msgstr ""
132
- "Για να προσθέσεις ένα click-to-tweet quote σε κάποιο άρθρο σου, απλά "
133
- "χρησιμοποίησε τα shortcodes από τη γραμμή εργαλειών του WordPress."
134
-
135
- #: bctt_options.php:89
136
- msgid "Here's how you format the shortcode:"
137
- msgstr "Το shortcode μοιάζει με το παρακάτω, απλά άλλαξε τις λέξεις:"
138
-
139
- #. translators: This text shows up as a sample tweet in the instructions for how to use the plugin.
140
- #: bctt_options.php:89
141
- msgid "Meaningful, tweetable quote."
142
- msgstr "Αυτό είναι ένα έξυπνο tweet έτοιμο για δημοσίευση."
143
-
144
- #. translators: Also, treat "BCTT" as a brand name, don't translate it
145
- #: bctt_options.php:90
146
- msgid ""
147
- "If you are using the visual editor, click the BCTT birdie in the toolbar to "
148
- "add a pre-formatted shortcode to your post."
149
- msgstr ""
150
- "Αν χρησιμοποιείς το visual editor, κάνε κλικ στο BCTT πουλάκι στη γραμμή "
151
- "εργαλειών για να προσθέσεις προ-διαμορφωμένα shortcodes στα άρθρα σου."
152
-
153
- #: bctt_options.php:91
154
- msgid ""
155
- "Tweet length is automatically shortened to 117 characters minus the length "
156
- "of your twitter name, to leave room for it and a link back to the post."
157
- msgstr ""
158
- "Οι λέξεις του tweet μειώνονται αυτόματα στους 117 χαρακτήρες λόγο προσθήκης "
159
- "του Twitter ονόματος σας."
160
-
161
- #: bctt_options.php:96
162
- msgid "Settings"
163
- msgstr "Ρυθμίσεις"
164
-
165
- #: bctt_options.php:97
166
- msgid ""
167
- "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
168
- "include the @ symbol."
169
- msgstr ""
170
- "Πρόσθεσε το Twitter όνομα σου για να εμφανίζεται στα tweets. Μην προσθέσεις "
171
- "το @, μόνο το όνομα."
172
-
173
- #: bctt_options.php:98
174
- msgid ""
175
- "Checking the box below will force the plugin to show the WordPress shortlink "
176
- "in place of the full URL. While this does not impact tweet character length, "
177
- "it is useful alongside plugins which customize the WordPress shortlink using "
178
- "services like bit.ly or yourls.org for tracking"
179
- msgstr ""
180
- "Ελέγχοντας το παρακάτω πλαίσιο, θα αναγκάσεις το πρόσθετο να αλλάξει τους "
181
- "συνδέσμους σε σύντομους συνδέσμους (shortlinks) του WordPress. Ενώ αυτό δεν "
182
- "θα επηρεάσει τη μείωση των χαρακτήρων στα tweets, είναι αρκετά χρήσιμο αν "
183
- "χρησιμοποιείτε άλλα πρόσθετα που συντομεύουν τους συνδέσμους σας, για "
184
- "παράδειγμα όπως το bit.ly ή το yourls.org."
185
-
186
- #: bctt_options.php:104
187
- msgctxt "label for text input on settings screen"
188
- msgid "Your Twitter Handle"
189
- msgstr "Το Twitter όνομα σας"
190
-
191
- #: bctt_options.php:107
192
- msgctxt "label for checkbox on settings screen"
193
- msgid "Use Short URL?"
194
- msgstr "Θέλεις να χρησιμοποιήσεις συντομευμένους συνδέσμους;"
195
-
196
- #: bctt_options.php:112
197
- msgid "Save Changes"
198
- msgstr "Αποθήκευση αλλαγών"
199
-
200
- #: bctt_options.php:114
201
- #, php-format
202
- msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
203
- msgstr "Ένα open source πρόσθετο από τον <a href=%s>Ben Meredith</a>"
204
-
205
- #: better-click-to-tweet.php:142
206
- msgctxt "Text for the box on the reader-facing box"
207
- msgid "Click To Tweet"
208
- msgstr "Κλικ για tweet"
209
-
210
- #: better-click-to-tweet.php:231
211
- msgctxt "text for the link on the plugins page"
212
- msgid "Settings"
213
- msgstr "Ρυθμίσεις"
214
-
215
- #. Plugin Name of the plugin/theme
216
- msgid "Better Click To Tweet"
217
- msgstr "Better Click To Tweet"
218
-
219
- #. Description of the plugin/theme
220
- msgid ""
221
- "The only Click To Tweet plugin to add translation support. The only Click To "
222
- "Tweet plugin to take into account your Twitter username's length in "
223
- "truncating long tweets, or to correctly take into account non-Roman "
224
- "characters. Simply put, as Click To Tweet plugins go, this one is, well, "
225
- "BETTER."
226
- msgstr ""
227
- "Το μοναδικό Click To Tweet πρόσθετο που είναι μεταφρασμένο. Το μοναδικό "
228
- "Click To Tweet πρόσθετο το οποίο σου επιτρέπει να χρησιμοποιήσεις όλους τους "
229
- "χαρακτήρες στα tweets, ή να γράφεις με λατινικούς χαρακτήρες. Με λίγα λόγια, "
230
- "αυτό είναι το καλύτερο Click To Tweet πρόσθετο."