Version Description
- fix resolving PHP notices related to the custom URL not being set.
- fix resolve outstanding errors around UTM tags add-on integration.
- chore tested up to WordPress version 5.2. you should definitely be on 5.2. It's awesome.
- bonus I feel like you people aren't reading my changelogs. I'm over here handing out discounts, and y'all just keep paying full price. try CHANGELOG to see if you get 10% off!
Download this release
Release Info
Developer | ben.meredith@gmail.com |
Plugin | Better Click To Tweet |
Version | 5.8.2 |
Comparing to | |
See all releases |
Code changes from version 5.8.1 to 5.8.2
- assets/block/build/script.js +2 -1025
- assets/block/init.php +11 -3
- better-click-to-tweet.php +1 -1
- includes/updater/BCTT_SL_Plugin_Updater.php +89 -17
- includes/updater/license-page.php +1 -1
- readme.txt +8 -2
assets/block/build/script.js
CHANGED
@@ -1,1029 +1,6 @@
|
|
1 |
-
this["
|
2 |
-
/******/ (function(modules) { // webpackBootstrap
|
3 |
-
/******/ // The module cache
|
4 |
-
/******/ var installedModules = {};
|
5 |
-
/******/
|
6 |
-
/******/ // The require function
|
7 |
-
/******/ function __webpack_require__(moduleId) {
|
8 |
-
/******/
|
9 |
-
/******/ // Check if module is in cache
|
10 |
-
/******/ if(installedModules[moduleId]) {
|
11 |
-
/******/ return installedModules[moduleId].exports;
|
12 |
-
/******/ }
|
13 |
-
/******/ // Create a new module (and put it into the cache)
|
14 |
-
/******/ var module = installedModules[moduleId] = {
|
15 |
-
/******/ i: moduleId,
|
16 |
-
/******/ l: false,
|
17 |
-
/******/ exports: {}
|
18 |
-
/******/ };
|
19 |
-
/******/
|
20 |
-
/******/ // Execute the module function
|
21 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
-
/******/
|
23 |
-
/******/ // Flag the module as loaded
|
24 |
-
/******/ module.l = true;
|
25 |
-
/******/
|
26 |
-
/******/ // Return the exports of the module
|
27 |
-
/******/ return module.exports;
|
28 |
-
/******/ }
|
29 |
-
/******/
|
30 |
-
/******/
|
31 |
-
/******/ // expose the modules object (__webpack_modules__)
|
32 |
-
/******/ __webpack_require__.m = modules;
|
33 |
-
/******/
|
34 |
-
/******/ // expose the module cache
|
35 |
-
/******/ __webpack_require__.c = installedModules;
|
36 |
-
/******/
|
37 |
-
/******/ // define getter function for harmony exports
|
38 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
39 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
40 |
-
/******/ Object.defineProperty(exports, name, {
|
41 |
-
/******/ configurable: false,
|
42 |
-
/******/ enumerable: true,
|
43 |
-
/******/ get: getter
|
44 |
-
/******/ });
|
45 |
-
/******/ }
|
46 |
-
/******/ };
|
47 |
-
/******/
|
48 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
49 |
-
/******/ __webpack_require__.n = function(module) {
|
50 |
-
/******/ var getter = module && module.__esModule ?
|
51 |
-
/******/ function getDefault() { return module['default']; } :
|
52 |
-
/******/ function getModuleExports() { return module; };
|
53 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
54 |
-
/******/ return getter;
|
55 |
-
/******/ };
|
56 |
-
/******/
|
57 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
58 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
59 |
-
/******/
|
60 |
-
/******/ // __webpack_public_path__
|
61 |
-
/******/ __webpack_require__.p = "";
|
62 |
-
/******/
|
63 |
-
/******/ // Load entry module and return exports
|
64 |
-
/******/ return __webpack_require__(__webpack_require__.s = 13);
|
65 |
-
/******/ })
|
66 |
-
/************************************************************************/
|
67 |
-
/******/ ([
|
68 |
-
/* 0 */
|
69 |
-
/***/ (function(module, exports, __webpack_require__) {
|
70 |
-
|
71 |
-
// Thank's IE8 for his funny defineProperty
|
72 |
-
module.exports = !__webpack_require__(5)(function () {
|
73 |
-
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
74 |
-
});
|
75 |
-
|
76 |
-
|
77 |
-
/***/ }),
|
78 |
-
/* 1 */
|
79 |
-
/***/ (function(module, exports) {
|
80 |
-
|
81 |
-
(function() { module.exports = this["wp"]["i18n"]; }());
|
82 |
-
|
83 |
-
/***/ }),
|
84 |
-
/* 2 */
|
85 |
-
/***/ (function(module, exports) {
|
86 |
-
|
87 |
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
88 |
-
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
89 |
-
? window : typeof self != 'undefined' && self.Math == Math ? self
|
90 |
-
// eslint-disable-next-line no-new-func
|
91 |
-
: Function('return this')();
|
92 |
-
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
93 |
-
|
94 |
-
|
95 |
-
/***/ }),
|
96 |
-
/* 3 */
|
97 |
-
/***/ (function(module, exports) {
|
98 |
-
|
99 |
-
var core = module.exports = { version: '2.5.3' };
|
100 |
-
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
101 |
-
|
102 |
-
|
103 |
-
/***/ }),
|
104 |
-
/* 4 */
|
105 |
-
/***/ (function(module, exports) {
|
106 |
-
|
107 |
-
module.exports = function (it) {
|
108 |
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
109 |
-
};
|
110 |
-
|
111 |
-
|
112 |
-
/***/ }),
|
113 |
-
/* 5 */
|
114 |
-
/***/ (function(module, exports) {
|
115 |
-
|
116 |
-
module.exports = function (exec) {
|
117 |
-
try {
|
118 |
-
return !!exec();
|
119 |
-
} catch (e) {
|
120 |
-
return true;
|
121 |
-
}
|
122 |
-
};
|
123 |
-
|
124 |
-
|
125 |
-
/***/ }),
|
126 |
-
/* 6 */
|
127 |
-
/***/ (function(module, exports, __webpack_require__) {
|
128 |
-
|
129 |
-
var global = __webpack_require__(2);
|
130 |
-
var core = __webpack_require__(3);
|
131 |
-
var ctx = __webpack_require__(20);
|
132 |
-
var hide = __webpack_require__(22);
|
133 |
-
var PROTOTYPE = 'prototype';
|
134 |
-
|
135 |
-
var $export = function (type, name, source) {
|
136 |
-
var IS_FORCED = type & $export.F;
|
137 |
-
var IS_GLOBAL = type & $export.G;
|
138 |
-
var IS_STATIC = type & $export.S;
|
139 |
-
var IS_PROTO = type & $export.P;
|
140 |
-
var IS_BIND = type & $export.B;
|
141 |
-
var IS_WRAP = type & $export.W;
|
142 |
-
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
143 |
-
var expProto = exports[PROTOTYPE];
|
144 |
-
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
145 |
-
var key, own, out;
|
146 |
-
if (IS_GLOBAL) source = name;
|
147 |
-
for (key in source) {
|
148 |
-
// contains in native
|
149 |
-
own = !IS_FORCED && target && target[key] !== undefined;
|
150 |
-
if (own && key in exports) continue;
|
151 |
-
// export native or passed
|
152 |
-
out = own ? target[key] : source[key];
|
153 |
-
// prevent global pollution for namespaces
|
154 |
-
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
155 |
-
// bind timers to global for call from export context
|
156 |
-
: IS_BIND && own ? ctx(out, global)
|
157 |
-
// wrap global constructors for prevent change them in library
|
158 |
-
: IS_WRAP && target[key] == out ? (function (C) {
|
159 |
-
var F = function (a, b, c) {
|
160 |
-
if (this instanceof C) {
|
161 |
-
switch (arguments.length) {
|
162 |
-
case 0: return new C();
|
163 |
-
case 1: return new C(a);
|
164 |
-
case 2: return new C(a, b);
|
165 |
-
} return new C(a, b, c);
|
166 |
-
} return C.apply(this, arguments);
|
167 |
-
};
|
168 |
-
F[PROTOTYPE] = C[PROTOTYPE];
|
169 |
-
return F;
|
170 |
-
// make static versions for prototype methods
|
171 |
-
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
172 |
-
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
173 |
-
if (IS_PROTO) {
|
174 |
-
(exports.virtual || (exports.virtual = {}))[key] = out;
|
175 |
-
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
176 |
-
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
177 |
-
}
|
178 |
-
}
|
179 |
-
};
|
180 |
-
// type bitmap
|
181 |
-
$export.F = 1; // forced
|
182 |
-
$export.G = 2; // global
|
183 |
-
$export.S = 4; // static
|
184 |
-
$export.P = 8; // proto
|
185 |
-
$export.B = 16; // bind
|
186 |
-
$export.W = 32; // wrap
|
187 |
-
$export.U = 64; // safe
|
188 |
-
$export.R = 128; // real proto method for `library`
|
189 |
-
module.exports = $export;
|
190 |
-
|
191 |
-
|
192 |
-
/***/ }),
|
193 |
-
/* 7 */
|
194 |
-
/***/ (function(module, exports, __webpack_require__) {
|
195 |
-
|
196 |
-
var anObject = __webpack_require__(23);
|
197 |
-
var IE8_DOM_DEFINE = __webpack_require__(24);
|
198 |
-
var toPrimitive = __webpack_require__(26);
|
199 |
-
var dP = Object.defineProperty;
|
200 |
-
|
201 |
-
exports.f = __webpack_require__(0) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
202 |
-
anObject(O);
|
203 |
-
P = toPrimitive(P, true);
|
204 |
-
anObject(Attributes);
|
205 |
-
if (IE8_DOM_DEFINE) try {
|
206 |
-
return dP(O, P, Attributes);
|
207 |
-
} catch (e) { /* empty */ }
|
208 |
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
209 |
-
if ('value' in Attributes) O[P] = Attributes.value;
|
210 |
-
return O;
|
211 |
-
};
|
212 |
-
|
213 |
-
|
214 |
-
/***/ }),
|
215 |
-
/* 8 */
|
216 |
-
/***/ (function(module, exports, __webpack_require__) {
|
217 |
-
|
218 |
-
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
219 |
-
var IObject = __webpack_require__(9);
|
220 |
-
var defined = __webpack_require__(10);
|
221 |
-
module.exports = function (it) {
|
222 |
-
return IObject(defined(it));
|
223 |
-
};
|
224 |
-
|
225 |
-
|
226 |
-
/***/ }),
|
227 |
-
/* 9 */
|
228 |
-
/***/ (function(module, exports, __webpack_require__) {
|
229 |
-
|
230 |
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
231 |
-
var cof = __webpack_require__(32);
|
232 |
-
// eslint-disable-next-line no-prototype-builtins
|
233 |
-
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
234 |
-
return cof(it) == 'String' ? it.split('') : Object(it);
|
235 |
-
};
|
236 |
-
|
237 |
-
|
238 |
-
/***/ }),
|
239 |
-
/* 10 */
|
240 |
-
/***/ (function(module, exports) {
|
241 |
-
|
242 |
-
// 7.2.1 RequireObjectCoercible(argument)
|
243 |
-
module.exports = function (it) {
|
244 |
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
245 |
-
return it;
|
246 |
-
};
|
247 |
-
|
248 |
-
|
249 |
-
/***/ }),
|
250 |
-
/* 11 */
|
251 |
-
/***/ (function(module, exports) {
|
252 |
-
|
253 |
-
// 7.1.4 ToInteger
|
254 |
-
var ceil = Math.ceil;
|
255 |
-
var floor = Math.floor;
|
256 |
-
module.exports = function (it) {
|
257 |
-
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
258 |
-
};
|
259 |
-
|
260 |
-
|
261 |
-
/***/ }),
|
262 |
-
/* 12 */
|
263 |
-
/***/ (function(module, exports) {
|
264 |
-
|
265 |
-
(function() { module.exports = this["wp"]["editor"]; }());
|
266 |
-
|
267 |
-
/***/ }),
|
268 |
-
/* 13 */
|
269 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
270 |
-
|
271 |
-
"use strict";
|
272 |
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
273 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__ = __webpack_require__(1);
|
274 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_i18n___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__);
|
275 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wordpress_blocks__ = __webpack_require__(14);
|
276 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wordpress_blocks___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__wordpress_blocks__);
|
277 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__editor__ = __webpack_require__(15);
|
278 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__render__ = __webpack_require__(52);
|
279 |
-
/**
|
280 |
-
* WordPress dependencies
|
281 |
-
*/
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Internal dependencies
|
287 |
-
*/
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Register block
|
293 |
-
*/
|
294 |
-
/* harmony default export */ __webpack_exports__["default"] = (Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_blocks__["registerBlockType"])("bctt/clicktotweet", {
|
295 |
-
title: Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__["__"])("Better Click to Tweet"),
|
296 |
-
description: Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__["__"])("Add text for your readers to tweet, calling them to action on your behalf."),
|
297 |
-
category: "widgets",
|
298 |
-
icon: "twitter",
|
299 |
-
keywords: [Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__["__"])("Twitter"), Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_i18n__["__"])("Tweet")],
|
300 |
-
edit: __WEBPACK_IMPORTED_MODULE_2__editor__["a" /* default */],
|
301 |
-
save: __WEBPACK_IMPORTED_MODULE_3__render__["a" /* default */]
|
302 |
-
}));
|
303 |
-
|
304 |
-
/***/ }),
|
305 |
-
/* 14 */
|
306 |
-
/***/ (function(module, exports) {
|
307 |
-
|
308 |
-
(function() { module.exports = this["wp"]["blocks"]; }());
|
309 |
-
|
310 |
-
/***/ }),
|
311 |
-
/* 15 */
|
312 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
313 |
-
|
314 |
-
"use strict";
|
315 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(16);
|
316 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
|
317 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(43);
|
318 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);
|
319 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wordpress_i18n__ = __webpack_require__(1);
|
320 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wordpress_i18n___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__wordpress_i18n__);
|
321 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_element__ = __webpack_require__(44);
|
322 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_element___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__wordpress_element__);
|
323 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__wordpress_editor__ = __webpack_require__(12);
|
324 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__wordpress_editor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__wordpress_editor__);
|
325 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__inspector__ = __webpack_require__(45);
|
326 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__editor_scss__ = __webpack_require__(51);
|
327 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__editor_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__editor_scss__);
|
328 |
-
|
329 |
-
/**
|
330 |
-
* External dependecies
|
331 |
-
*/
|
332 |
-
|
333 |
-
|
334 |
-
/**
|
335 |
-
* WordPress dependencies
|
336 |
-
*/
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
/**
|
342 |
-
* Internal dependencies
|
343 |
-
*/
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
/**
|
348 |
-
* Block edit component
|
349 |
-
*/
|
350 |
-
var editor = function editor(props) {
|
351 |
-
var attributes = props.attributes,
|
352 |
-
setAttributes = props.setAttributes,
|
353 |
-
className = props.className;
|
354 |
-
var tweet = attributes.tweet,
|
355 |
-
prompt = attributes.prompt;
|
356 |
-
// Events
|
357 |
-
|
358 |
-
var onChangeTweet = function onChangeTweet(value) {
|
359 |
-
setAttributes({ tweet: value });
|
360 |
-
};
|
361 |
-
|
362 |
-
var onClickPrompt = function onClickPrompt() {
|
363 |
-
return false;
|
364 |
-
};
|
365 |
-
// Render block editor
|
366 |
-
return wp.element.createElement(
|
367 |
-
__WEBPACK_IMPORTED_MODULE_3__wordpress_element__["Fragment"],
|
368 |
-
null,
|
369 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_5__inspector__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props)),
|
370 |
-
wp.element.createElement(
|
371 |
-
"span",
|
372 |
-
{ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()(className, "bctt-click-to-tweet") },
|
373 |
-
wp.element.createElement(
|
374 |
-
"span",
|
375 |
-
{ className: "bctt-ctt-text" },
|
376 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_4__wordpress_editor__["RichText"], {
|
377 |
-
format: "string",
|
378 |
-
formattingControls: [],
|
379 |
-
tagName: "div",
|
380 |
-
placeholder: Object(__WEBPACK_IMPORTED_MODULE_2__wordpress_i18n__["__"])("Enter text for readers to Tweet"),
|
381 |
-
onChange: onChangeTweet,
|
382 |
-
value: tweet
|
383 |
-
})
|
384 |
-
),
|
385 |
-
wp.element.createElement(
|
386 |
-
"a",
|
387 |
-
{ href: "#", onClick: onClickPrompt, className: "bctt-ctt-btn" },
|
388 |
-
prompt
|
389 |
-
)
|
390 |
-
)
|
391 |
-
);
|
392 |
-
};
|
393 |
-
|
394 |
-
/* harmony default export */ __webpack_exports__["a"] = (editor);
|
395 |
-
|
396 |
-
/***/ }),
|
397 |
-
/* 16 */
|
398 |
-
/***/ (function(module, exports, __webpack_require__) {
|
399 |
-
|
400 |
-
"use strict";
|
401 |
-
|
402 |
-
|
403 |
-
exports.__esModule = true;
|
404 |
-
|
405 |
-
var _assign = __webpack_require__(17);
|
406 |
-
|
407 |
-
var _assign2 = _interopRequireDefault(_assign);
|
408 |
-
|
409 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
410 |
-
|
411 |
-
exports.default = _assign2.default || function (target) {
|
412 |
-
for (var i = 1; i < arguments.length; i++) {
|
413 |
-
var source = arguments[i];
|
414 |
-
|
415 |
-
for (var key in source) {
|
416 |
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
417 |
-
target[key] = source[key];
|
418 |
-
}
|
419 |
-
}
|
420 |
-
}
|
421 |
-
|
422 |
-
return target;
|
423 |
-
};
|
424 |
-
|
425 |
-
/***/ }),
|
426 |
-
/* 17 */
|
427 |
-
/***/ (function(module, exports, __webpack_require__) {
|
428 |
-
|
429 |
-
module.exports = { "default": __webpack_require__(18), __esModule: true };
|
430 |
-
|
431 |
-
/***/ }),
|
432 |
-
/* 18 */
|
433 |
-
/***/ (function(module, exports, __webpack_require__) {
|
434 |
-
|
435 |
-
__webpack_require__(19);
|
436 |
-
module.exports = __webpack_require__(3).Object.assign;
|
437 |
-
|
438 |
-
|
439 |
-
/***/ }),
|
440 |
-
/* 19 */
|
441 |
-
/***/ (function(module, exports, __webpack_require__) {
|
442 |
-
|
443 |
-
// 19.1.3.1 Object.assign(target, source)
|
444 |
-
var $export = __webpack_require__(6);
|
445 |
-
|
446 |
-
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(28) });
|
447 |
-
|
448 |
-
|
449 |
-
/***/ }),
|
450 |
-
/* 20 */
|
451 |
-
/***/ (function(module, exports, __webpack_require__) {
|
452 |
-
|
453 |
-
// optional / simple context binding
|
454 |
-
var aFunction = __webpack_require__(21);
|
455 |
-
module.exports = function (fn, that, length) {
|
456 |
-
aFunction(fn);
|
457 |
-
if (that === undefined) return fn;
|
458 |
-
switch (length) {
|
459 |
-
case 1: return function (a) {
|
460 |
-
return fn.call(that, a);
|
461 |
-
};
|
462 |
-
case 2: return function (a, b) {
|
463 |
-
return fn.call(that, a, b);
|
464 |
-
};
|
465 |
-
case 3: return function (a, b, c) {
|
466 |
-
return fn.call(that, a, b, c);
|
467 |
-
};
|
468 |
-
}
|
469 |
-
return function (/* ...args */) {
|
470 |
-
return fn.apply(that, arguments);
|
471 |
-
};
|
472 |
-
};
|
473 |
-
|
474 |
-
|
475 |
-
/***/ }),
|
476 |
-
/* 21 */
|
477 |
-
/***/ (function(module, exports) {
|
478 |
-
|
479 |
-
module.exports = function (it) {
|
480 |
-
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
481 |
-
return it;
|
482 |
-
};
|
483 |
-
|
484 |
-
|
485 |
-
/***/ }),
|
486 |
-
/* 22 */
|
487 |
-
/***/ (function(module, exports, __webpack_require__) {
|
488 |
-
|
489 |
-
var dP = __webpack_require__(7);
|
490 |
-
var createDesc = __webpack_require__(27);
|
491 |
-
module.exports = __webpack_require__(0) ? function (object, key, value) {
|
492 |
-
return dP.f(object, key, createDesc(1, value));
|
493 |
-
} : function (object, key, value) {
|
494 |
-
object[key] = value;
|
495 |
-
return object;
|
496 |
-
};
|
497 |
-
|
498 |
-
|
499 |
-
/***/ }),
|
500 |
-
/* 23 */
|
501 |
-
/***/ (function(module, exports, __webpack_require__) {
|
502 |
-
|
503 |
-
var isObject = __webpack_require__(4);
|
504 |
-
module.exports = function (it) {
|
505 |
-
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
506 |
-
return it;
|
507 |
-
};
|
508 |
-
|
509 |
-
|
510 |
-
/***/ }),
|
511 |
-
/* 24 */
|
512 |
-
/***/ (function(module, exports, __webpack_require__) {
|
513 |
-
|
514 |
-
module.exports = !__webpack_require__(0) && !__webpack_require__(5)(function () {
|
515 |
-
return Object.defineProperty(__webpack_require__(25)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
516 |
-
});
|
517 |
-
|
518 |
-
|
519 |
-
/***/ }),
|
520 |
-
/* 25 */
|
521 |
-
/***/ (function(module, exports, __webpack_require__) {
|
522 |
-
|
523 |
-
var isObject = __webpack_require__(4);
|
524 |
-
var document = __webpack_require__(2).document;
|
525 |
-
// typeof document.createElement is 'object' in old IE
|
526 |
-
var is = isObject(document) && isObject(document.createElement);
|
527 |
-
module.exports = function (it) {
|
528 |
-
return is ? document.createElement(it) : {};
|
529 |
-
};
|
530 |
-
|
531 |
-
|
532 |
-
/***/ }),
|
533 |
-
/* 26 */
|
534 |
-
/***/ (function(module, exports, __webpack_require__) {
|
535 |
-
|
536 |
-
// 7.1.1 ToPrimitive(input [, PreferredType])
|
537 |
-
var isObject = __webpack_require__(4);
|
538 |
-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
539 |
-
// and the second argument - flag - preferred type is a string
|
540 |
-
module.exports = function (it, S) {
|
541 |
-
if (!isObject(it)) return it;
|
542 |
-
var fn, val;
|
543 |
-
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
544 |
-
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
545 |
-
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
546 |
-
throw TypeError("Can't convert object to primitive value");
|
547 |
-
};
|
548 |
-
|
549 |
-
|
550 |
-
/***/ }),
|
551 |
-
/* 27 */
|
552 |
-
/***/ (function(module, exports) {
|
553 |
-
|
554 |
-
module.exports = function (bitmap, value) {
|
555 |
-
return {
|
556 |
-
enumerable: !(bitmap & 1),
|
557 |
-
configurable: !(bitmap & 2),
|
558 |
-
writable: !(bitmap & 4),
|
559 |
-
value: value
|
560 |
-
};
|
561 |
-
};
|
562 |
-
|
563 |
-
|
564 |
-
/***/ }),
|
565 |
-
/* 28 */
|
566 |
-
/***/ (function(module, exports, __webpack_require__) {
|
567 |
-
|
568 |
-
"use strict";
|
569 |
-
|
570 |
-
// 19.1.2.1 Object.assign(target, source, ...)
|
571 |
-
var getKeys = __webpack_require__(29);
|
572 |
-
var gOPS = __webpack_require__(40);
|
573 |
-
var pIE = __webpack_require__(41);
|
574 |
-
var toObject = __webpack_require__(42);
|
575 |
-
var IObject = __webpack_require__(9);
|
576 |
-
var $assign = Object.assign;
|
577 |
-
|
578 |
-
// should work with symbols and should have deterministic property order (V8 bug)
|
579 |
-
module.exports = !$assign || __webpack_require__(5)(function () {
|
580 |
-
var A = {};
|
581 |
-
var B = {};
|
582 |
-
// eslint-disable-next-line no-undef
|
583 |
-
var S = Symbol();
|
584 |
-
var K = 'abcdefghijklmnopqrst';
|
585 |
-
A[S] = 7;
|
586 |
-
K.split('').forEach(function (k) { B[k] = k; });
|
587 |
-
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
588 |
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
589 |
-
var T = toObject(target);
|
590 |
-
var aLen = arguments.length;
|
591 |
-
var index = 1;
|
592 |
-
var getSymbols = gOPS.f;
|
593 |
-
var isEnum = pIE.f;
|
594 |
-
while (aLen > index) {
|
595 |
-
var S = IObject(arguments[index++]);
|
596 |
-
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
597 |
-
var length = keys.length;
|
598 |
-
var j = 0;
|
599 |
-
var key;
|
600 |
-
while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
|
601 |
-
} return T;
|
602 |
-
} : $assign;
|
603 |
-
|
604 |
-
|
605 |
-
/***/ }),
|
606 |
-
/* 29 */
|
607 |
-
/***/ (function(module, exports, __webpack_require__) {
|
608 |
-
|
609 |
-
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
610 |
-
var $keys = __webpack_require__(30);
|
611 |
-
var enumBugKeys = __webpack_require__(39);
|
612 |
-
|
613 |
-
module.exports = Object.keys || function keys(O) {
|
614 |
-
return $keys(O, enumBugKeys);
|
615 |
-
};
|
616 |
-
|
617 |
-
|
618 |
-
/***/ }),
|
619 |
-
/* 30 */
|
620 |
-
/***/ (function(module, exports, __webpack_require__) {
|
621 |
-
|
622 |
-
var has = __webpack_require__(31);
|
623 |
-
var toIObject = __webpack_require__(8);
|
624 |
-
var arrayIndexOf = __webpack_require__(33)(false);
|
625 |
-
var IE_PROTO = __webpack_require__(36)('IE_PROTO');
|
626 |
-
|
627 |
-
module.exports = function (object, names) {
|
628 |
-
var O = toIObject(object);
|
629 |
-
var i = 0;
|
630 |
-
var result = [];
|
631 |
-
var key;
|
632 |
-
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
633 |
-
// Don't enum bug & hidden keys
|
634 |
-
while (names.length > i) if (has(O, key = names[i++])) {
|
635 |
-
~arrayIndexOf(result, key) || result.push(key);
|
636 |
-
}
|
637 |
-
return result;
|
638 |
-
};
|
639 |
-
|
640 |
-
|
641 |
-
/***/ }),
|
642 |
-
/* 31 */
|
643 |
-
/***/ (function(module, exports) {
|
644 |
-
|
645 |
-
var hasOwnProperty = {}.hasOwnProperty;
|
646 |
-
module.exports = function (it, key) {
|
647 |
-
return hasOwnProperty.call(it, key);
|
648 |
-
};
|
649 |
-
|
650 |
-
|
651 |
-
/***/ }),
|
652 |
-
/* 32 */
|
653 |
-
/***/ (function(module, exports) {
|
654 |
-
|
655 |
-
var toString = {}.toString;
|
656 |
-
|
657 |
-
module.exports = function (it) {
|
658 |
-
return toString.call(it).slice(8, -1);
|
659 |
-
};
|
660 |
-
|
661 |
-
|
662 |
-
/***/ }),
|
663 |
-
/* 33 */
|
664 |
-
/***/ (function(module, exports, __webpack_require__) {
|
665 |
-
|
666 |
-
// false -> Array#indexOf
|
667 |
-
// true -> Array#includes
|
668 |
-
var toIObject = __webpack_require__(8);
|
669 |
-
var toLength = __webpack_require__(34);
|
670 |
-
var toAbsoluteIndex = __webpack_require__(35);
|
671 |
-
module.exports = function (IS_INCLUDES) {
|
672 |
-
return function ($this, el, fromIndex) {
|
673 |
-
var O = toIObject($this);
|
674 |
-
var length = toLength(O.length);
|
675 |
-
var index = toAbsoluteIndex(fromIndex, length);
|
676 |
-
var value;
|
677 |
-
// Array#includes uses SameValueZero equality algorithm
|
678 |
-
// eslint-disable-next-line no-self-compare
|
679 |
-
if (IS_INCLUDES && el != el) while (length > index) {
|
680 |
-
value = O[index++];
|
681 |
-
// eslint-disable-next-line no-self-compare
|
682 |
-
if (value != value) return true;
|
683 |
-
// Array#indexOf ignores holes, Array#includes - not
|
684 |
-
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
685 |
-
if (O[index] === el) return IS_INCLUDES || index || 0;
|
686 |
-
} return !IS_INCLUDES && -1;
|
687 |
-
};
|
688 |
-
};
|
689 |
-
|
690 |
-
|
691 |
-
/***/ }),
|
692 |
-
/* 34 */
|
693 |
-
/***/ (function(module, exports, __webpack_require__) {
|
694 |
-
|
695 |
-
// 7.1.15 ToLength
|
696 |
-
var toInteger = __webpack_require__(11);
|
697 |
-
var min = Math.min;
|
698 |
-
module.exports = function (it) {
|
699 |
-
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
700 |
-
};
|
701 |
-
|
702 |
-
|
703 |
-
/***/ }),
|
704 |
-
/* 35 */
|
705 |
-
/***/ (function(module, exports, __webpack_require__) {
|
706 |
-
|
707 |
-
var toInteger = __webpack_require__(11);
|
708 |
-
var max = Math.max;
|
709 |
-
var min = Math.min;
|
710 |
-
module.exports = function (index, length) {
|
711 |
-
index = toInteger(index);
|
712 |
-
return index < 0 ? max(index + length, 0) : min(index, length);
|
713 |
-
};
|
714 |
-
|
715 |
-
|
716 |
-
/***/ }),
|
717 |
-
/* 36 */
|
718 |
-
/***/ (function(module, exports, __webpack_require__) {
|
719 |
-
|
720 |
-
var shared = __webpack_require__(37)('keys');
|
721 |
-
var uid = __webpack_require__(38);
|
722 |
-
module.exports = function (key) {
|
723 |
-
return shared[key] || (shared[key] = uid(key));
|
724 |
-
};
|
725 |
-
|
726 |
-
|
727 |
-
/***/ }),
|
728 |
-
/* 37 */
|
729 |
-
/***/ (function(module, exports, __webpack_require__) {
|
730 |
-
|
731 |
-
var global = __webpack_require__(2);
|
732 |
-
var SHARED = '__core-js_shared__';
|
733 |
-
var store = global[SHARED] || (global[SHARED] = {});
|
734 |
-
module.exports = function (key) {
|
735 |
-
return store[key] || (store[key] = {});
|
736 |
-
};
|
737 |
-
|
738 |
-
|
739 |
-
/***/ }),
|
740 |
-
/* 38 */
|
741 |
-
/***/ (function(module, exports) {
|
742 |
-
|
743 |
-
var id = 0;
|
744 |
-
var px = Math.random();
|
745 |
-
module.exports = function (key) {
|
746 |
-
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
747 |
-
};
|
748 |
-
|
749 |
-
|
750 |
-
/***/ }),
|
751 |
-
/* 39 */
|
752 |
-
/***/ (function(module, exports) {
|
753 |
-
|
754 |
-
// IE 8- don't enum bug keys
|
755 |
-
module.exports = (
|
756 |
-
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
757 |
-
).split(',');
|
758 |
-
|
759 |
-
|
760 |
-
/***/ }),
|
761 |
-
/* 40 */
|
762 |
-
/***/ (function(module, exports) {
|
763 |
-
|
764 |
-
exports.f = Object.getOwnPropertySymbols;
|
765 |
-
|
766 |
-
|
767 |
-
/***/ }),
|
768 |
-
/* 41 */
|
769 |
-
/***/ (function(module, exports) {
|
770 |
-
|
771 |
-
exports.f = {}.propertyIsEnumerable;
|
772 |
-
|
773 |
-
|
774 |
-
/***/ }),
|
775 |
-
/* 42 */
|
776 |
-
/***/ (function(module, exports, __webpack_require__) {
|
777 |
-
|
778 |
-
// 7.1.13 ToObject(argument)
|
779 |
-
var defined = __webpack_require__(10);
|
780 |
-
module.exports = function (it) {
|
781 |
-
return Object(defined(it));
|
782 |
-
};
|
783 |
-
|
784 |
-
|
785 |
-
/***/ }),
|
786 |
-
/* 43 */
|
787 |
-
/***/ (function(module, exports, __webpack_require__) {
|
788 |
-
|
789 |
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
790 |
Copyright (c) 2016 Jed Watson.
|
791 |
Licensed under the MIT License (MIT), see
|
792 |
http://jedwatson.github.io/classnames
|
793 |
*/
|
794 |
-
|
795 |
-
|
796 |
-
(function () {
|
797 |
-
'use strict';
|
798 |
-
|
799 |
-
var hasOwn = {}.hasOwnProperty;
|
800 |
-
|
801 |
-
function classNames () {
|
802 |
-
var classes = [];
|
803 |
-
|
804 |
-
for (var i = 0; i < arguments.length; i++) {
|
805 |
-
var arg = arguments[i];
|
806 |
-
if (!arg) continue;
|
807 |
-
|
808 |
-
var argType = typeof arg;
|
809 |
-
|
810 |
-
if (argType === 'string' || argType === 'number') {
|
811 |
-
classes.push(arg);
|
812 |
-
} else if (Array.isArray(arg)) {
|
813 |
-
classes.push(classNames.apply(null, arg));
|
814 |
-
} else if (argType === 'object') {
|
815 |
-
for (var key in arg) {
|
816 |
-
if (hasOwn.call(arg, key) && arg[key]) {
|
817 |
-
classes.push(key);
|
818 |
-
}
|
819 |
-
}
|
820 |
-
}
|
821 |
-
}
|
822 |
-
|
823 |
-
return classes.join(' ');
|
824 |
-
}
|
825 |
-
|
826 |
-
if (typeof module !== 'undefined' && module.exports) {
|
827 |
-
module.exports = classNames;
|
828 |
-
} else if (true) {
|
829 |
-
// register as 'classnames', consistent with npm package name
|
830 |
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
831 |
-
return classNames;
|
832 |
-
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
833 |
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
834 |
-
} else {
|
835 |
-
window.classNames = classNames;
|
836 |
-
}
|
837 |
-
}());
|
838 |
-
|
839 |
-
|
840 |
-
/***/ }),
|
841 |
-
/* 44 */
|
842 |
-
/***/ (function(module, exports) {
|
843 |
-
|
844 |
-
(function() { module.exports = this["wp"]["element"]; }());
|
845 |
-
|
846 |
-
/***/ }),
|
847 |
-
/* 45 */
|
848 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
849 |
-
|
850 |
-
"use strict";
|
851 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(46);
|
852 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
|
853 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__ = __webpack_require__(1);
|
854 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__wordpress_i18n___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__);
|
855 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wordpress_editor__ = __webpack_require__(12);
|
856 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wordpress_editor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__wordpress_editor__);
|
857 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_components__ = __webpack_require__(50);
|
858 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_components___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__);
|
859 |
-
|
860 |
-
/**
|
861 |
-
* WordPress dependencies
|
862 |
-
*/
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
/**
|
868 |
-
* Create an Inspector Controls wrapper Component
|
869 |
-
*/
|
870 |
-
var Inspector = function Inspector(_ref) {
|
871 |
-
var attributes = _ref.attributes,
|
872 |
-
setAttributes = _ref.setAttributes;
|
873 |
-
var username = attributes.username,
|
874 |
-
via = attributes.via,
|
875 |
-
url = attributes.url,
|
876 |
-
urlcustom = attributes.urlcustom,
|
877 |
-
nofollow = attributes.nofollow,
|
878 |
-
prompt = attributes.prompt;
|
879 |
-
|
880 |
-
|
881 |
-
var updateAttribute = function updateAttribute(name, value) {
|
882 |
-
setAttributes(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, name, value));
|
883 |
-
};
|
884 |
-
|
885 |
-
return wp.element.createElement(
|
886 |
-
__WEBPACK_IMPORTED_MODULE_2__wordpress_editor__["InspectorControls"],
|
887 |
-
null,
|
888 |
-
wp.element.createElement(
|
889 |
-
__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["PanelBody"],
|
890 |
-
{ title: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("General") },
|
891 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["TextControl"], {
|
892 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Twitter Username"),
|
893 |
-
value: username,
|
894 |
-
onChange: function onChange(value) {
|
895 |
-
return updateAttribute("username", value);
|
896 |
-
}
|
897 |
-
}),
|
898 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["ToggleControl"], {
|
899 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Include the username in Tweet?"),
|
900 |
-
checked: via,
|
901 |
-
onChange: function onChange(value) {
|
902 |
-
return updateAttribute("via", value);
|
903 |
-
}
|
904 |
-
}),
|
905 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["TextControl"], {
|
906 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Prompt"),
|
907 |
-
value: prompt,
|
908 |
-
onChange: function onChange(value) {
|
909 |
-
return updateAttribute("prompt", value);
|
910 |
-
},
|
911 |
-
help: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Text for action/prompt link")
|
912 |
-
})
|
913 |
-
),
|
914 |
-
wp.element.createElement(
|
915 |
-
__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["PanelBody"],
|
916 |
-
{ title: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("URL"), initialOpen: false },
|
917 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["ToggleControl"], {
|
918 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Include URL in tweet?"),
|
919 |
-
checked: url,
|
920 |
-
onChange: function onChange(value) {
|
921 |
-
return updateAttribute("url", value);
|
922 |
-
}
|
923 |
-
}),
|
924 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["TextControl"], {
|
925 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Custom URL"),
|
926 |
-
value: urlcustom,
|
927 |
-
onChange: function onChange(value) {
|
928 |
-
return updateAttribute("urlcustom", value);
|
929 |
-
},
|
930 |
-
help: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Custom URL to use instead of post")
|
931 |
-
}),
|
932 |
-
wp.element.createElement(__WEBPACK_IMPORTED_MODULE_3__wordpress_components__["ToggleControl"], {
|
933 |
-
label: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Nofollow"),
|
934 |
-
checked: nofollow,
|
935 |
-
onChange: function onChange(value) {
|
936 |
-
return updateAttribute("nofollow", value);
|
937 |
-
},
|
938 |
-
help: Object(__WEBPACK_IMPORTED_MODULE_1__wordpress_i18n__["__"])("Make links nofollow")
|
939 |
-
})
|
940 |
-
)
|
941 |
-
);
|
942 |
-
};
|
943 |
-
|
944 |
-
/* harmony default export */ __webpack_exports__["a"] = (Inspector);
|
945 |
-
|
946 |
-
/***/ }),
|
947 |
-
/* 46 */
|
948 |
-
/***/ (function(module, exports, __webpack_require__) {
|
949 |
-
|
950 |
-
"use strict";
|
951 |
-
|
952 |
-
|
953 |
-
exports.__esModule = true;
|
954 |
-
|
955 |
-
var _defineProperty = __webpack_require__(47);
|
956 |
-
|
957 |
-
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
958 |
-
|
959 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
960 |
-
|
961 |
-
exports.default = function (obj, key, value) {
|
962 |
-
if (key in obj) {
|
963 |
-
(0, _defineProperty2.default)(obj, key, {
|
964 |
-
value: value,
|
965 |
-
enumerable: true,
|
966 |
-
configurable: true,
|
967 |
-
writable: true
|
968 |
-
});
|
969 |
-
} else {
|
970 |
-
obj[key] = value;
|
971 |
-
}
|
972 |
-
|
973 |
-
return obj;
|
974 |
-
};
|
975 |
-
|
976 |
-
/***/ }),
|
977 |
-
/* 47 */
|
978 |
-
/***/ (function(module, exports, __webpack_require__) {
|
979 |
-
|
980 |
-
module.exports = { "default": __webpack_require__(48), __esModule: true };
|
981 |
-
|
982 |
-
/***/ }),
|
983 |
-
/* 48 */
|
984 |
-
/***/ (function(module, exports, __webpack_require__) {
|
985 |
-
|
986 |
-
__webpack_require__(49);
|
987 |
-
var $Object = __webpack_require__(3).Object;
|
988 |
-
module.exports = function defineProperty(it, key, desc) {
|
989 |
-
return $Object.defineProperty(it, key, desc);
|
990 |
-
};
|
991 |
-
|
992 |
-
|
993 |
-
/***/ }),
|
994 |
-
/* 49 */
|
995 |
-
/***/ (function(module, exports, __webpack_require__) {
|
996 |
-
|
997 |
-
var $export = __webpack_require__(6);
|
998 |
-
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
999 |
-
$export($export.S + $export.F * !__webpack_require__(0), 'Object', { defineProperty: __webpack_require__(7).f });
|
1000 |
-
|
1001 |
-
|
1002 |
-
/***/ }),
|
1003 |
-
/* 50 */
|
1004 |
-
/***/ (function(module, exports) {
|
1005 |
-
|
1006 |
-
(function() { module.exports = this["wp"]["components"]; }());
|
1007 |
-
|
1008 |
-
/***/ }),
|
1009 |
-
/* 51 */
|
1010 |
-
/***/ (function(module, exports) {
|
1011 |
-
|
1012 |
-
// removed by extract-text-webpack-plugin
|
1013 |
-
|
1014 |
-
/***/ }),
|
1015 |
-
/* 52 */
|
1016 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1017 |
-
|
1018 |
-
"use strict";
|
1019 |
-
/**
|
1020 |
-
* Block save component
|
1021 |
-
*/
|
1022 |
-
var render = function render() {
|
1023 |
-
return null;
|
1024 |
-
};
|
1025 |
-
|
1026 |
-
/* harmony default export */ __webpack_exports__["a"] = (render);
|
1027 |
-
|
1028 |
-
/***/ })
|
1029 |
-
/******/ ]);
|
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=13)}([function(t,e,n){t.exports=!n(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},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){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(2),o=n(3),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,d=p?o:o[e]||(o[e]={}),_=d.prototype,w=p?r:v?r[e]:(r[e]||{}).prototype;p&&(n=e);for(a in n)(f=!s&&w&&void 0!==w[a])&&a in d||(l=f?w[a]:n[a],d[a]=p&&"function"!=typeof w[a]?n[a]:m&&f?u(l,r):h&&w[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&&((d.virtual||(d.virtual={}))[a]=l,t&i.R&&_&&!_[a]&&c(_,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(23),o=n(24),u=n(26),c=Object.defineProperty;e.f=n(0)?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(9),o=n(10);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(32);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(1),o=(n.n(r),n(14)),u=(n.n(o),n(15)),c=n(52);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")],edit:u.a,save:c.a})},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e,n){"use strict";var r=n(16),o=n.n(r),u=n(43),c=n.n(u),i=n(1),a=(n.n(i),n(44)),f=(n.n(a),n(12)),l=(n.n(f),n(45)),s=n(51),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(17),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(18),__esModule:!0}},function(t,e,n){n(19),t.exports=n(3).Object.assign},function(t,e,n){var r=n(6);r(r.S+r.F,"Object",{assign:n(28)})},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(7),o=n(27);t.exports=n(0)?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(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(0)&&!n(5)(function(){return 7!=Object.defineProperty(n(25)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(4),o=n(2).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},function(t,e,n){var r=n(4);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(29),o=n(40),u=n(41),c=n(42),i=n(9),a=Object.assign;t.exports=!a||n(5)(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(30),o=n(39);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(31),o=n(8),u=n(33)(!1),c=n(36)("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(8),o=n(34),u=n(35);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(11),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),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(37)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(2),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(10);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(46),o=n.n(r),u=n(1),c=(n.n(u),n(12)),i=(n.n(c),n(50)),a=(n.n(i),function(t){var e=t.attributes,n=t.setAttributes,r=e.username,a=e.via,f=e.url,l=e.urlcustom,s=e.nofollow,p=e.prompt,v=function(t,e){n(o()({},t,e))};return wp.element.createElement(c.InspectorControls,null,wp.element.createElement(i.PanelBody,{title:Object(u.__)("General")},wp.element.createElement(i.TextControl,{label:Object(u.__)("Twitter Username"),value:r,onChange:function(t){return v("username",t)}}),wp.element.createElement(i.ToggleControl,{label:Object(u.__)("Include the username in Tweet?"),checked:a,onChange:function(t){return v("via",t)}}),wp.element.createElement(i.TextControl,{label:Object(u.__)("Prompt"),value:p,onChange:function(t){return v("prompt",t)},help:Object(u.__)("Text for action/prompt link")})),wp.element.createElement(i.PanelBody,{title:Object(u.__)("URL"),initialOpen:!1},wp.element.createElement(i.ToggleControl,{label:Object(u.__)("Include URL in tweet?"),checked:f,onChange:function(t){return v("url",t)}}),wp.element.createElement(i.TextControl,{label:Object(u.__)("Custom URL"),value:l,onChange:function(t){return v("urlcustom",t)},help:Object(u.__)("Custom URL to use instead of post")}),wp.element.createElement(i.ToggleControl,{label:Object(u.__)("Nofollow"),checked:s,onChange:function(t){return v("nofollow",t)},help:Object(u.__)("Make links nofollow")})))});e.a=a},function(t,e,n){"use strict";e.__esModule=!0;var r=n(47),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){t.exports={default:n(48),__esModule:!0}},function(t,e,n){n(49);var r=n(3).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(6);r(r.S+r.F*!n(0),"Object",{defineProperty:n(7).f})},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}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/block/init.php
CHANGED
@@ -54,6 +54,7 @@ register_block_type( 'bctt/clicktotweet', array(
|
|
54 |
),
|
55 |
'urlcustom' => array(
|
56 |
'type' => 'string',
|
|
|
57 |
),
|
58 |
'nofollow' => array(
|
59 |
'type' => 'boolean',
|
@@ -69,15 +70,22 @@ register_block_type( 'bctt/clicktotweet', array(
|
|
69 |
|
70 |
// Callback function to render bctt on frontend
|
71 |
function bctt_block_callback( $attributes ) {
|
72 |
-
extract( $attributes );
|
73 |
|
74 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
$shortcode_attributes = apply_filters ( 'bctt_block_render_attributes', array(
|
77 |
'tweet' => $tweet,
|
78 |
'via' => $via ? 'yes' : 'no',
|
79 |
'username' => $username,
|
80 |
-
'url' => $urlcustom ? $urlcustom : $
|
81 |
'nofollow' => $nofollow ? 'yes' : 'no',
|
82 |
'prompt' => $prompt
|
83 |
), $attributes );
|
54 |
),
|
55 |
'urlcustom' => array(
|
56 |
'type' => 'string',
|
57 |
+
'default' => ''
|
58 |
),
|
59 |
'nofollow' => array(
|
60 |
'type' => 'boolean',
|
70 |
|
71 |
// Callback function to render bctt on frontend
|
72 |
function bctt_block_callback( $attributes ) {
|
|
|
73 |
|
74 |
+
$tweet = $attributes['tweet'];
|
75 |
+
$via = $attributes['via'];
|
76 |
+
$username = $attributes['username'];
|
77 |
+
$url = $attributes['url'];
|
78 |
+
$urlcustom = $attributes['urlcustom'];
|
79 |
+
$nofollow = $attributes['nofollow'];
|
80 |
+
$prompt = $attributes['prompt'];
|
81 |
+
|
82 |
+
$showUrl = ( $url ? 'yes' : 'no' );
|
83 |
|
84 |
$shortcode_attributes = apply_filters ( 'bctt_block_render_attributes', array(
|
85 |
'tweet' => $tweet,
|
86 |
'via' => $via ? 'yes' : 'no',
|
87 |
'username' => $username,
|
88 |
+
'url' => $urlcustom ? $urlcustom : $showUrl,
|
89 |
'nofollow' => $nofollow ? 'yes' : 'no',
|
90 |
'prompt' => $prompt
|
91 |
), $attributes );
|
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.8.
|
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.8.2
|
6 |
* Author: Ben Meredith
|
7 |
* Author URI: https://www.betterclicktotweet.com
|
8 |
* Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
|
includes/updater/BCTT_SL_Plugin_Updater.php
CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
7 |
* Allows plugins to use their own update API.
|
8 |
*
|
9 |
* @author Easy Digital Downloads
|
10 |
-
* @version 1.6.
|
11 |
*/
|
12 |
class BCTT_SL_Plugin_Updater {
|
13 |
|
@@ -19,6 +19,8 @@ class BCTT_SL_Plugin_Updater {
|
|
19 |
private $wp_override = false;
|
20 |
private $cache_key = '';
|
21 |
|
|
|
|
|
22 |
/**
|
23 |
* Class constructor.
|
24 |
*
|
@@ -119,6 +121,9 @@ class BCTT_SL_Plugin_Updater {
|
|
119 |
|
120 |
$_transient_data->response[ $this->name ] = $version_info;
|
121 |
|
|
|
|
|
|
|
122 |
}
|
123 |
|
124 |
$_transient_data->last_checked = time();
|
@@ -167,6 +172,19 @@ class BCTT_SL_Plugin_Updater {
|
|
167 |
if ( false === $version_info ) {
|
168 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
$this->set_version_info_cache( $version_info );
|
171 |
}
|
172 |
|
@@ -260,7 +278,8 @@ class BCTT_SL_Plugin_Updater {
|
|
260 |
'is_ssl' => is_ssl(),
|
261 |
'fields' => array(
|
262 |
'banners' => array(),
|
263 |
-
'reviews' => false
|
|
|
264 |
)
|
265 |
);
|
266 |
|
@@ -287,27 +306,47 @@ class BCTT_SL_Plugin_Updater {
|
|
287 |
|
288 |
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
289 |
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
290 |
-
$
|
291 |
-
foreach ( $_data->sections as $key => $value ) {
|
292 |
-
$new_sections[ $key ] = $value;
|
293 |
-
}
|
294 |
-
|
295 |
-
$_data->sections = $new_sections;
|
296 |
}
|
297 |
|
298 |
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
299 |
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
300 |
-
$
|
301 |
-
|
302 |
-
$new_banners[ $key ] = $value;
|
303 |
-
}
|
304 |
|
305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
|
308 |
return $_data;
|
309 |
}
|
310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
/**
|
312 |
* Disable SSL verification in order to prevent download update failures
|
313 |
*
|
@@ -338,7 +377,31 @@ class BCTT_SL_Plugin_Updater {
|
|
338 |
*/
|
339 |
private function api_request( $_action, $_data ) {
|
340 |
|
341 |
-
global $wp_version;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
|
343 |
$data = array_merge( $this->api_data, $_data );
|
344 |
|
@@ -346,7 +409,7 @@ class BCTT_SL_Plugin_Updater {
|
|
346 |
return;
|
347 |
}
|
348 |
|
349 |
-
if( $this->api_url == trailingslashit (home_url() ) ) {
|
350 |
return false; // Don't allow a plugin to ping itself
|
351 |
}
|
352 |
|
@@ -362,7 +425,6 @@ class BCTT_SL_Plugin_Updater {
|
|
362 |
'beta' => ! empty( $data['beta'] ),
|
363 |
);
|
364 |
|
365 |
-
$verify_ssl = $this->verify_ssl();
|
366 |
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
367 |
|
368 |
if ( ! is_wp_error( $request ) ) {
|
@@ -379,6 +441,10 @@ class BCTT_SL_Plugin_Updater {
|
|
379 |
$request->banners = maybe_unserialize( $request->banners );
|
380 |
}
|
381 |
|
|
|
|
|
|
|
|
|
382 |
if( ! empty( $request->sections ) ) {
|
383 |
foreach( $request->sections as $key => $section ) {
|
384 |
$request->$key = (array) $section;
|
@@ -468,7 +534,13 @@ class BCTT_SL_Plugin_Updater {
|
|
468 |
return false; // Cache is expired
|
469 |
}
|
470 |
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
|
473 |
}
|
474 |
|
7 |
* Allows plugins to use their own update API.
|
8 |
*
|
9 |
* @author Easy Digital Downloads
|
10 |
+
* @version 1.6.18
|
11 |
*/
|
12 |
class BCTT_SL_Plugin_Updater {
|
13 |
|
19 |
private $wp_override = false;
|
20 |
private $cache_key = '';
|
21 |
|
22 |
+
private $health_check_timeout = 5;
|
23 |
+
|
24 |
/**
|
25 |
* Class constructor.
|
26 |
*
|
121 |
|
122 |
$_transient_data->response[ $this->name ] = $version_info;
|
123 |
|
124 |
+
// Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
|
125 |
+
$_transient_data->response[ $this->name ]->plugin = $this->name;
|
126 |
+
|
127 |
}
|
128 |
|
129 |
$_transient_data->last_checked = time();
|
172 |
if ( false === $version_info ) {
|
173 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
174 |
|
175 |
+
// Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
|
176 |
+
if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
|
177 |
+
$version_info->banners = $this->convert_object_to_array( $version_info->banners );
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) {
|
181 |
+
$version_info->sections = $this->convert_object_to_array( $version_info->sections );
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
|
185 |
+
$version_info->icons = $this->convert_object_to_array( $version_info->icons );
|
186 |
+
}
|
187 |
+
|
188 |
$this->set_version_info_cache( $version_info );
|
189 |
}
|
190 |
|
278 |
'is_ssl' => is_ssl(),
|
279 |
'fields' => array(
|
280 |
'banners' => array(),
|
281 |
+
'reviews' => false,
|
282 |
+
'icons' => array(),
|
283 |
)
|
284 |
);
|
285 |
|
306 |
|
307 |
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
308 |
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
309 |
+
$_data->sections = $this->convert_object_to_array( $_data->sections );
|
|
|
|
|
|
|
|
|
|
|
310 |
}
|
311 |
|
312 |
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
313 |
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
314 |
+
$_data->banners = $this->convert_object_to_array( $_data->banners );
|
315 |
+
}
|
|
|
|
|
316 |
|
317 |
+
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
318 |
+
if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
|
319 |
+
$_data->icons = $this->convert_object_to_array( $_data->icons );
|
320 |
+
}
|
321 |
+
|
322 |
+
if( ! isset( $_data->plugin ) ) {
|
323 |
+
$_data->plugin = $this->name;
|
324 |
}
|
325 |
|
326 |
return $_data;
|
327 |
}
|
328 |
|
329 |
+
/**
|
330 |
+
* Convert some objects to arrays when injecting data into the update API
|
331 |
+
*
|
332 |
+
* Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
|
333 |
+
* decoding, they are objects. This method allows us to pass in the object and return an associative array.
|
334 |
+
*
|
335 |
+
* @since 3.6.5
|
336 |
+
*
|
337 |
+
* @param stdClass $data
|
338 |
+
*
|
339 |
+
* @return array
|
340 |
+
*/
|
341 |
+
private function convert_object_to_array( $data ) {
|
342 |
+
$new_data = array();
|
343 |
+
foreach ( $data as $key => $value ) {
|
344 |
+
$new_data[ $key ] = $value;
|
345 |
+
}
|
346 |
+
|
347 |
+
return $new_data;
|
348 |
+
}
|
349 |
+
|
350 |
/**
|
351 |
* Disable SSL verification in order to prevent download update failures
|
352 |
*
|
377 |
*/
|
378 |
private function api_request( $_action, $_data ) {
|
379 |
|
380 |
+
global $wp_version, $edd_plugin_url_available;
|
381 |
+
|
382 |
+
$verify_ssl = $this->verify_ssl();
|
383 |
+
|
384 |
+
// Do a quick status check on this domain if we haven't already checked it.
|
385 |
+
$store_hash = md5( $this->api_url );
|
386 |
+
if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
|
387 |
+
$test_url_parts = parse_url( $this->api_url );
|
388 |
+
|
389 |
+
$scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http';
|
390 |
+
$host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
|
391 |
+
$port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
|
392 |
+
|
393 |
+
if ( empty( $host ) ) {
|
394 |
+
$edd_plugin_url_available[ $store_hash ] = false;
|
395 |
+
} else {
|
396 |
+
$test_url = $scheme . '://' . $host . $port;
|
397 |
+
$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) );
|
398 |
+
$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
if ( false === $edd_plugin_url_available[ $store_hash ] ) {
|
403 |
+
return;
|
404 |
+
}
|
405 |
|
406 |
$data = array_merge( $this->api_data, $_data );
|
407 |
|
409 |
return;
|
410 |
}
|
411 |
|
412 |
+
if( $this->api_url == trailingslashit ( home_url() ) ) {
|
413 |
return false; // Don't allow a plugin to ping itself
|
414 |
}
|
415 |
|
425 |
'beta' => ! empty( $data['beta'] ),
|
426 |
);
|
427 |
|
|
|
428 |
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
429 |
|
430 |
if ( ! is_wp_error( $request ) ) {
|
441 |
$request->banners = maybe_unserialize( $request->banners );
|
442 |
}
|
443 |
|
444 |
+
if ( $request && isset( $request->icons ) ) {
|
445 |
+
$request->icons = maybe_unserialize( $request->icons );
|
446 |
+
}
|
447 |
+
|
448 |
if( ! empty( $request->sections ) ) {
|
449 |
foreach( $request->sections as $key => $section ) {
|
450 |
$request->$key = (array) $section;
|
534 |
return false; // Cache is expired
|
535 |
}
|
536 |
|
537 |
+
// We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
|
538 |
+
$cache['value'] = json_decode( $cache['value'] );
|
539 |
+
if ( ! empty( $cache['value']->icons ) ) {
|
540 |
+
$cache['value']->icons = (array) $cache['value']->icons;
|
541 |
+
}
|
542 |
+
|
543 |
+
return $cache['value'];
|
544 |
|
545 |
}
|
546 |
|
includes/updater/license-page.php
CHANGED
@@ -120,7 +120,7 @@ function bctt_register_license_option() {
|
|
120 |
$args = array(
|
121 |
'type' => 'string',
|
122 |
'sanitize_callback' => 'sanitize_text_field',
|
123 |
-
'default' =>
|
124 |
);
|
125 |
foreach ( $active_plugins as $addons ) {
|
126 |
$shortname = bctt_addon_slug( bctt_addon_shortname( $addons['Name'] ) );
|
120 |
$args = array(
|
121 |
'type' => 'string',
|
122 |
'sanitize_callback' => 'sanitize_text_field',
|
123 |
+
'default' => null,
|
124 |
);
|
125 |
foreach ( $active_plugins as $addons ) {
|
126 |
$shortname = bctt_addon_slug( bctt_addon_shortname( $addons['Name'] ) );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: ben.meredith@gmail.com, wpsteward
|
|
3 |
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: 5.
|
7 |
-
Stable tag: 5.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -97,6 +97,12 @@ Donations: http://benlikes.us/donate
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 5.8.1 =
|
101 |
* new — created a new nag for the plugins page announcing the UTM tags add-on.
|
102 |
* new — added a link to the main settings page for folks to check out the new UTM Tags addon.
|
3 |
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: 5.2
|
7 |
+
Stable tag: 5.8.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 5.8.2 =
|
101 |
+
* fix — resolving PHP notices related to the custom URL not being set.
|
102 |
+
* fix — resolve outstanding errors around UTM tags add-on integration.
|
103 |
+
* chore — tested up to WordPress version 5.2. you should definitely be on 5.2. It's awesome.
|
104 |
+
* bonus — I feel like you people aren't reading my changelogs. I'm over here handing out discounts, and y'all just keep paying full price. try CHANGELOG to see if you get 10% off!
|
105 |
+
|
106 |
= 5.8.1 =
|
107 |
* new — created a new nag for the plugins page announcing the UTM tags add-on.
|
108 |
* new — added a link to the main settings page for folks to check out the new UTM Tags addon.
|