Skip to content

Commit

Permalink
1.2.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
stooit committed Dec 18, 2021
1 parent c70d01c commit 25f040d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/quant/quant.php
Expand Up @@ -5,7 +5,7 @@
* Description: QuantCDN static edge integration
* Author: Stuart Rowlands
* Plugin URI: https://www.quantcdn.io
* Version: 1.2.2
* Version: 1.2.3
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
Expand Down
6 changes: 5 additions & 1 deletion plugins/quant/readme.txt
Expand Up @@ -5,7 +5,7 @@ Tags: static, jamstack, cdn, quant, static site generator
Requires at least: 4.6
Tested up to: 5.8.2
Requires PHP: 7.2
Stable tag: 1.2.2
Stable tag: 1.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -55,6 +55,10 @@ Follow the [Forms documentation](https://docs.quantcdn.io/docs/dashboard/forms)

== Changelog ==

= 1.2.3 =
* Improved theme asset regex.
* Make content routes consistent (strip trailing slash).

= 1.2.2 =
* Improved theme asset lookup to exclude node_modules.
* Improved support for Elementor.
Expand Down
7 changes: 7 additions & 0 deletions plugins/quant/src/Client.php
Expand Up @@ -85,6 +85,11 @@ public function redirect($from, $to, $code) {
*/
public function content($data) {

// Strip trailing slashes from content routes (except home).
if ( strlen( $data['url'] ) > 1 ) {
$data['url'] = rtrim($data['url'], '/');
}

$args = [
'headers' => $this->headers,
'body' => json_encode($data),
Expand All @@ -109,6 +114,8 @@ public function file($route, $path) {
$headers['Content-type'] = 'application/binary';
$headers['Quant-File-Url'] = $route;

error_log($route);

$endpoint = $this->endpoint . '/file-upload?path=' . $path;
$args = [
'headers' => $headers,
Expand Down
4 changes: 4 additions & 0 deletions plugins/quant/src/functions.php
Expand Up @@ -2,6 +2,10 @@

use Quant\Client;

if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once(__DIR__.'/../quant-cli.php');
}

if (!empty($_SERVER['HTTP_QUANT_TOKEN'])) {

$token = get_option('quant_internal_token');
Expand Down
2 changes: 1 addition & 1 deletion plugins/quant/src/seed/ThemeAssetsBatch.php
Expand Up @@ -25,7 +25,7 @@ class QuantThemeAssetsBatch extends Quant_WP_Batch {
/**
* The regex for asset matching.
*/
public $assetRegex = '/^.+(.jpe?g|.png|.svg|.ttf|.woff|.woff2|.otf|.ico|.css|.js)$/i';
public $assetRegex = '/^.+(\.jpe?g|\.png|\.svg|\.ttf|\.woff|\.woff2|\.otf|\.ico|\.css|\.js)$/i';

/**
* The iteration count.
Expand Down

0 comments on commit 25f040d

Please sign in to comment.