Plugin Directory

Changeset 2543988


Ignore:
Timestamp:
06/08/2021 01:30:09 AM (5 years ago)
Author:
stooit
Message:

1.2.1 release.

Location:
quant
Files:
48 added
4 edited

Legend:

Unmodified
Added
Removed
  • quant/trunk/quant.php

    r2535945 r2543988  
    66 * Author: Stuart Rowlands
    77 * Plugin URI: https://www.quantcdn.io
    8  * Version: 1.2.0
     8 * Version: 1.2.1
    99 * License: GPL-2.0+
    1010 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    6464    $batch = new QuantHomeBatch();
    6565    Quant_WP_Batch_Processor::get_instance()->register( $batch );
    66 
    67     $seedOptions = get_option(QUANT_SEED_KEY);
    68     if ($seedOptions['theme_assets']) {
    69         $batch = new QuantThemeAssetsBatch();
    70         Quant_WP_Batch_Processor::get_instance()->register( $batch );
    71     }
    72 
     66    $batch = new QuantThemeAssetsBatch();
     67    Quant_WP_Batch_Processor::get_instance()->register( $batch );
    7368    $batch = new QuantCustomRoutesBatch();
    7469    Quant_WP_Batch_Processor::get_instance()->register( $batch );
  • quant/trunk/readme.txt

    r2535942 r2543988  
    66Tested up to: 5.7.2
    77Requires PHP: 7.2
    8 Stable tag: 1.2.0
     8Stable tag: 1.2.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5656== Changelog ==
    5757
     58= 1.2.1 =
     59* New feature: Additional support for relative asset rewriting.
     60* Simplified settings screen.
     61
    5862= 1.2.0 =
    5963* New feature: Improved support for Elementor.
  • quant/trunk/src/Client.php

    r2535942 r2543988  
    99
    1010    private $settings;
     11    private $seedOptions;
    1112    private $headers = [];
    1213    private $endpoint;
     
    1617    public function __construct() {
    1718        $this->settings = get_option(QUANT_SETTINGS_KEY);
     19        $this->seedOptions = get_option(QUANT_SEED_KEY);
    1820        $this->webserver = $this->settings['webserver_url'];
    1921        $this->host = $this->settings['webserver_host'];
     
    391393        $markup = preg_replace("/http(s?)\:\/\/{$host}/i", '', $markup);
    392394
     395        // Allow additional domain rewrites for relative paths.
     396        $stripDomains = explode("\n", $this->seedOptions['domains_strip']);
     397        foreach ($stripDomains as $domain) {
     398            $d = trim($domain);
     399            $markup = preg_replace("/http(s?)\:\/\/{$d}\:{$port}/i", '', $markup);
     400            $markup = preg_replace("/http(s?)\:\/\/{$d}/i", '', $markup);
     401        }
     402
    393403        return str_replace(get_site_url(), '', $markup);
    394404    }
  • quant/trunk/src/Settings.php

    r2535942 r2543988  
    9191        add_settings_section('seed', 'Seed content', '__return_empty_string', $seedKey);
    9292
    93         add_settings_field('seed_theme_assets', 'Theme assets', ['Quant\Field', 'checkbox'], $seedKey, 'seed', [
    94             'name' => "{$seedKey}[theme_assets]",
    95             'description' => 'Additional theme assets (fonts, images, js)',
    96             'value' => $seedOptions['theme_assets'] ?? 0,
    97         ]);
    98 
    9993        add_settings_field('seed_404_route', '404 path', ['Quant\Field', 'text'], $seedKey, 'seed', [
    10094            'name' => "{$seedKey}[404_route]",
     
    107101            'description' => 'Enter custom content or file routes (e.g /path/to/content or /path/to/file.css)',
    108102            'value' => $seedOptions['custom_routes'] ?? '/robots.txt',
     103        ]);
     104
     105        add_settings_field('seed_domains_strip', 'Relative rewrite', ['Quant\Field', 'textarea'], $seedKey, 'seed', [
     106            'name' => "{$seedKey}[domains_strip]",
     107            'description' => 'Optional domains (e.g www.example.com) to rewrite as relative',
     108            'value' => $seedOptions['domains_strip'] ?? '',
    109109        ]);
    110110
Note: See TracChangeset for help on using the changeset viewer.