Better Click To Tweet - Version 5.6.0

Version Description

  • fix improving compatibility with WordPress 5.0 and the new block-based (Gutenberg) editor. Thanks again to @ajitbohra for the help
  • fix resolve "invalid headers" problem on certain new installs
Download this release

Release Info

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

Code changes from version 5.5 to 5.6.0

assets/block/init.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
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' ));
15
  if ( ! bctt_is_default_styles_dequeued() ) {
16
  $stylesheet_url = bctt_get_stylesheet_url();
17
 
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
 
better-click-to-tweet.php CHANGED
@@ -2,20 +2,21 @@
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.5
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
  include 'i18n-module.php';
13
  include 'bctt_options.php';
14
  include 'bctt-i18n.php';
15
  include 'admin-nags.php';
16
 
17
- defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
18
-
19
  /*
20
  * Strips the html, shortens the text (after checking for mb_internal_encoding compatibility)
21
  * and adds an ellipsis if the text has been shortened
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.0
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
docker-compose.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.1'
2
+
3
+ services:
4
+
5
+ wordpress:
6
+ image: wordpress
7
+ ports:
8
+ - 9999:80
9
+ environment:
10
+ WORDPRESS_DB_PASSWORD: betterclicktotweet
11
+ volumes:
12
+ - ./:/var/www/html/wp-content/plugins/better-click-to-tweet
13
+
14
+ mysql:
15
+ image: mysql:5.7
16
+ environment:
17
+ MYSQL_ROOT_PASSWORD: betterclicktotweet
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.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,10 @@ Donations: http://benlikes.us/donate
101
 
102
  == Changelog ==
103
 
 
 
 
 
104
  = 5.5 =
105
  * Enhancement — added compatibility with WordPress 5.0's new editor, codenamed Gutenberg (thanks to Ajit Bohra @ajitbohra for all the great work!)
106
  * Enhancement — Some CSS modifications to make the plugin play nicely with the new editor.
4
  Tags: click to tweet, twitter, tweet,
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 5.5
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.0 =
105
+ * fix — improving compatibility with WordPress 5.0 and the new block-based (Gutenberg) editor. Thanks again to @ajitbohra for the help
106
+ * fix — resolve "invalid headers" problem on certain new installs
107
+
108
  = 5.5 =
109
  * Enhancement — added compatibility with WordPress 5.0's new editor, codenamed Gutenberg (thanks to Ajit Bohra @ajitbohra for all the great work!)
110
  * Enhancement — Some CSS modifications to make the plugin play nicely with the new editor.
trunk/assets/block/init.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
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' ));
15
  if ( ! bctt_is_default_styles_dequeued() ) {
16
  $stylesheet_url = bctt_get_stylesheet_url();
17
 
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
 
trunk/better-click-to-tweet.php CHANGED
@@ -2,20 +2,21 @@
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.5
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
  include 'i18n-module.php';
13
  include 'bctt_options.php';
14
  include 'bctt-i18n.php';
15
  include 'admin-nags.php';
16
 
17
- defined( 'ABSPATH' ) or die( "No soup for you. You leave now." );
18
-
19
  /*
20
  * Strips the html, shortens the text (after checking for mb_internal_encoding compatibility)
21
  * and adds an ellipsis if the text has been shortened
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.0
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
trunk/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.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -101,6 +101,10 @@ Donations: http://benlikes.us/donate
101
 
102
  == Changelog ==
103
 
 
 
 
 
104
  = 5.5 =
105
  * Enhancement — added compatibility with WordPress 5.0's new editor, codenamed Gutenberg (thanks to Ajit Bohra @ajitbohra for all the great work!)
106
  * Enhancement — Some CSS modifications to make the plugin play nicely with the new editor.
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
 
102
  == Changelog ==
103
 
104
+ = 5.6.0 =
105
+ * fix — improving compatibility with WordPress 5.0 and the new block-based (Gutenberg) editor. Thanks again to @ajitbohra for the help
106
+ * fix — resolve "invalid headers" problem on certain new installs
107
+
108
  = 5.5 =
109
  * Enhancement — added compatibility with WordPress 5.0's new editor, codenamed Gutenberg (thanks to Ajit Bohra @ajitbohra for all the great work!)
110
  * Enhancement — Some CSS modifications to make the plugin play nicely with the new editor.
webpack.config.js DELETED
@@ -1,103 +0,0 @@
1
- /**
2
- * External Dependencies
3
- */
4
- const webpack = require("webpack");
5
- const CleanWebpackPlugin = require("clean-webpack-plugin");
6
- const ExtractTextPlugin = require("extract-text-webpack-plugin");
7
- const WebpackRTLPlugin = require("webpack-rtl-plugin");
8
-
9
- // Enviornment Flag
10
- const inProduction = "production" === process.env.NODE_ENV;
11
-
12
- // Editor CSS loader
13
- const editBlocksCSSPlugin = new ExtractTextPlugin({
14
- filename: "./assets/block/build/editor.css"
15
- });
16
-
17
- // Configuration for the ExtractTextPlugin.
18
- const extractConfig = {
19
- use: [
20
- { loader: "raw-loader" },
21
- {
22
- loader: "postcss-loader",
23
- options: {
24
- plugins: [require("autoprefixer")]
25
- }
26
- },
27
- {
28
- loader: "sass-loader",
29
- query: {
30
- outputStyle: inProduction ? "compressed" : "nested"
31
- }
32
- }
33
- ]
34
- };
35
-
36
- // Externals
37
- const externals = {
38
- react: "React"
39
- };
40
- // WordPress dependences
41
- const wpDependencies = [
42
- "components",
43
- "element",
44
- "blocks",
45
- "editor",
46
- "hooks",
47
- "utils",
48
- "date",
49
- "data",
50
- "i18n",
51
- "editPost",
52
- "plugins",
53
- "apiRequest"
54
- ];
55
- wpDependencies.forEach(wpDependency => {
56
- externals["@wordpress/" + wpDependency] = {
57
- this: ["wp", wpDependency]
58
- };
59
- });
60
-
61
- // Webpack config.
62
- const config = {
63
- entry: "./assets/block/src/index.js",
64
- externals,
65
- output: {
66
- filename: "./assets/block/build/script.js",
67
- path: __dirname,
68
- library: ["bctt", "[name]"],
69
- libraryTarget: "this"
70
- },
71
- resolve: {
72
- modules: [__dirname, "node_modules"]
73
- },
74
- module: {
75
- rules: [
76
- {
77
- test: /\.js$/,
78
- exclude: /node_modules/,
79
- use: "babel-loader"
80
- },
81
- {
82
- test: /editor\.s?css$/,
83
- use: editBlocksCSSPlugin.extract(extractConfig)
84
- }
85
- ]
86
- },
87
- plugins: [
88
- new CleanWebpackPlugin(["build"]),
89
- editBlocksCSSPlugin,
90
- new WebpackRTLPlugin()
91
- ],
92
- stats: {
93
- children: false
94
- }
95
- };
96
-
97
- // For Productions
98
- if (inProduction) {
99
- config.plugins.push(new webpack.optimize.UglifyJsPlugin({ sourceMap: true }));
100
- config.plugins.push(new webpack.LoaderOptionsPlugin({ minimize: true }));
101
- }
102
-
103
- module.exports = config;