Changeset 2543988
- Timestamp:
- 06/08/2021 01:30:09 AM (5 years ago)
- Location:
- quant
- Files:
-
- 48 added
- 4 edited
-
tags/1.2.1 (added)
-
tags/1.2.1/quant.php (added)
-
tags/1.2.1/readme.txt (added)
-
tags/1.2.1/src (added)
-
tags/1.2.1/src/App.php (added)
-
tags/1.2.1/src/Client.php (added)
-
tags/1.2.1/src/Field.php (added)
-
tags/1.2.1/src/Settings.php (added)
-
tags/1.2.1/src/SettingsScreen.php (added)
-
tags/1.2.1/src/functions.php (added)
-
tags/1.2.1/src/seed (added)
-
tags/1.2.1/src/seed/ArchivesBatch.php (added)
-
tags/1.2.1/src/seed/CategoryBatch.php (added)
-
tags/1.2.1/src/seed/CustomCronRoutesBatch.php (added)
-
tags/1.2.1/src/seed/CustomPostTypes.php (added)
-
tags/1.2.1/src/seed/CustomRoutesBatch.php (added)
-
tags/1.2.1/src/seed/CustomTaxonomies.php (added)
-
tags/1.2.1/src/seed/HomeBatch.php (added)
-
tags/1.2.1/src/seed/MediaAssetsBatch.php (added)
-
tags/1.2.1/src/seed/PageBatch.php (added)
-
tags/1.2.1/src/seed/PostBatch.php (added)
-
tags/1.2.1/src/seed/TagBatch.php (added)
-
tags/1.2.1/src/seed/ThemeAssetsBatch.php (added)
-
tags/1.2.1/templates (added)
-
tags/1.2.1/templates/quant-validate.php (added)
-
tags/1.2.1/uninstall.php (added)
-
tags/1.2.1/wp-batch-processing (added)
-
tags/1.2.1/wp-batch-processing/README.md (added)
-
tags/1.2.1/wp-batch-processing/assets (added)
-
tags/1.2.1/wp-batch-processing/assets/processor.js (added)
-
tags/1.2.1/wp-batch-processing/changelog.txt (added)
-
tags/1.2.1/wp-batch-processing/examples (added)
-
tags/1.2.1/wp-batch-processing/examples/class-example-batch.php (added)
-
tags/1.2.1/wp-batch-processing/examples/processing.gif (added)
-
tags/1.2.1/wp-batch-processing/includes (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch-ajax-handler.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch-item.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch-list-table.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch-processor-admin.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch-processor.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-batch.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-bp-helper.php (added)
-
tags/1.2.1/wp-batch-processing/includes/class-bp-singleton.php (added)
-
tags/1.2.1/wp-batch-processing/views (added)
-
tags/1.2.1/wp-batch-processing/views/batch-list.php (added)
-
tags/1.2.1/wp-batch-processing/views/batch-manage.php (added)
-
tags/1.2.1/wp-batch-processing/views/batch-view.php (added)
-
tags/1.2.1/wp-batch-processing/wp-batch-processing.php (added)
-
trunk/quant.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Client.php (modified) (3 diffs)
-
trunk/src/Settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quant/trunk/quant.php
r2535945 r2543988 6 6 * Author: Stuart Rowlands 7 7 * Plugin URI: https://www.quantcdn.io 8 * Version: 1.2. 08 * Version: 1.2.1 9 9 * License: GPL-2.0+ 10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 64 64 $batch = new QuantHomeBatch(); 65 65 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 ); 73 68 $batch = new QuantCustomRoutesBatch(); 74 69 Quant_WP_Batch_Processor::get_instance()->register( $batch ); -
quant/trunk/readme.txt
r2535942 r2543988 6 6 Tested up to: 5.7.2 7 7 Requires PHP: 7.2 8 Stable tag: 1.2. 08 Stable tag: 1.2.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 1.2.1 = 59 * New feature: Additional support for relative asset rewriting. 60 * Simplified settings screen. 61 58 62 = 1.2.0 = 59 63 * New feature: Improved support for Elementor. -
quant/trunk/src/Client.php
r2535942 r2543988 9 9 10 10 private $settings; 11 private $seedOptions; 11 12 private $headers = []; 12 13 private $endpoint; … … 16 17 public function __construct() { 17 18 $this->settings = get_option(QUANT_SETTINGS_KEY); 19 $this->seedOptions = get_option(QUANT_SEED_KEY); 18 20 $this->webserver = $this->settings['webserver_url']; 19 21 $this->host = $this->settings['webserver_host']; … … 391 393 $markup = preg_replace("/http(s?)\:\/\/{$host}/i", '', $markup); 392 394 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 393 403 return str_replace(get_site_url(), '', $markup); 394 404 } -
quant/trunk/src/Settings.php
r2535942 r2543988 91 91 add_settings_section('seed', 'Seed content', '__return_empty_string', $seedKey); 92 92 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 99 93 add_settings_field('seed_404_route', '404 path', ['Quant\Field', 'text'], $seedKey, 'seed', [ 100 94 'name' => "{$seedKey}[404_route]", … … 107 101 'description' => 'Enter custom content or file routes (e.g /path/to/content or /path/to/file.css)', 108 102 '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'] ?? '', 109 109 ]); 110 110
Note: See TracChangeset
for help on using the changeset viewer.