Skip to content

Commit

Permalink
Tested with Wordpress v6.1.
Browse files Browse the repository at this point in the history
Fixed bug in Content-Security-Policy generator where a directive was not spelt correctly.
Updated JSlite to fix some javascript handling issues.
Minor syntax improvements.
  • Loading branch information
hexydec committed Nov 14, 2022
1 parent 90f8c87 commit 97325b4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ protected function matchesEtag(string $html) : bool {
*/
protected function getContentSecurityPolicy(array $config) : ?string {
$fields = [
'default' => 'default',
'default' => 'default-src',
'style' => 'style-src',
'script' => 'script-src',
'image' => 'image-src',
Expand Down
2 changes: 1 addition & 1 deletion assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static function buildCss(array $files, string $target, ?array $minify = n
}

// create the directory if it doesn't exist
$dir = \dirname($target);
$dir = \dirname($target);
if (!\is_dir($dir)) {
\mkdir($dir, 0755);
}
Expand Down
2 changes: 1 addition & 1 deletion packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class packages {
/**
* @var string VERSION The version number of the application, this is used in the cache key for CSS/Javascript that is minified
*/
public const VERSION = '0.6.3';
public const VERSION = '0.6.4';

/**
* @var string INSTALLDIR The folder where the dependencies are stored
Expand Down
15 changes: 13 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: hexydec
Tags: minify,minification,performance,security,optimization
Requires at least: 5.9
Tested up to: 5.9
Tested up to: 6.1
Requires PHP: 7.4
Stable tag: 0.6.3
Stable tag: 0.6.5
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html

Expand Down Expand Up @@ -136,6 +136,17 @@ Preload is implemented through a "Link" header, which lists all the assets to pr

== Changelog ==

= Version 0.6.5 =

* Tested with Wordpress v6.1
* Fixed bug in Content-Security-Policy generator where a directive was not spelt correctly
* Updated JSlite to fix some javascript handling issues
* Minor syntax improvements

= Version 0.6.4 =

* Tested with Wordpress v6.0

= Version 0.6.3 =

* Updated dependencies for better PHP 8.1 compatibility
Expand Down
12 changes: 6 additions & 6 deletions torque.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Plugin Name: Torque - Optimise the transport of your Website
Plugin URI: https://github.com/hexydec/torque
Description: Make your Wordpress website noticably faster by optimising how it is delivered. Analyse your website's performance and security, minify and combine your assets, and configure an array of performance and security settings quickly and easily with this comprehensive plugin. Achieves the best compression of any minification plugin.
Version: 0.6.3
Version: 0.6.5
Requires PHP: 7.4
Author: Hexydec
Author URI: https://github.com/hexydec/
Expand All @@ -24,25 +24,25 @@

// from GitHub, download packages
if (\class_exists('\\hexydec\\torque\\installExternal')) {
$obj = new \hexydec\torque\installExternal();
$obj = new installExternal();

// for Wordpress, packages are included
} else {
$obj = new \hexydec\torque\install();
$obj = new install();
}
$obj->install();
});

// install the admin menu
\add_action('admin_menu', function () {
$obj = new \hexydec\torque\admin();
$obj = new admin();
$obj->update();
$obj->draw();
});

// load the app
\add_action('wp_loaded', function () {
$obj = new \hexydec\torque\app();
$obj = new app();
$obj->optimise();
});

Expand All @@ -51,7 +51,7 @@

// rebuild files when a plugin is updated
\add_action('upgrader_process_complete', function () {
\hexydec\torque\assets::rebuildAssets();
assets::rebuildAssets();
});

// add rebuild command
Expand Down

0 comments on commit 97325b4

Please sign in to comment.