Changeset 3263433
- Timestamp:
- 03/28/2025 10:32:23 AM (12 months ago)
- Location:
- fastpixel-website-accelerator/trunk
- Files:
-
- 2 added
- 17 edited
-
fastpixel.php (modified) (2 diffs)
-
inc/backend/assets/backend.js (modified) (1 diff)
-
inc/backend/controllers/cache.php (modified) (7 diffs)
-
inc/backend/controllers/classes/post-types-statuses.php (modified) (1 diff)
-
inc/backend/controllers/classes/wpml.php (added)
-
inc/backend/controllers/tabs/javascript.php (modified) (2 diffs)
-
inc/backend/controllers/tabs/settings.php (modified) (6 diffs)
-
inc/backend/controllers/ui-multi.php (modified) (3 diffs)
-
inc/backend/models/diag-tests/config-file.php (modified) (3 diffs)
-
inc/backend/models/ui.php (modified) (1 diff)
-
inc/classes/excluded-by-cookie.php (added)
-
inc/classes/excluded-file-extensions.php (modified) (2 diffs)
-
inc/classes/excluded-url-params.php (modified) (1 diff)
-
inc/classes/excluded-urls.php (modified) (2 diffs)
-
inc/classes/request.php (modified) (1 diff)
-
inc/config-model.php (modified) (3 diffs)
-
inc/url.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastpixel-website-accelerator/trunk/fastpixel.php
r3255528 r3263433 5 5 * Description: Faster WordPress Made Easy – Solve all your website speed problems effortlessly with just a few clicks. 6 6 * Author: ShortPixel 7 * Version: 1.0.4 47 * Version: 1.0.45 8 8 * Text Domain: fastpixel-website-accelerator 9 9 * Domain Path: /languages … … 21 21 defined('ABSPATH') || exit; 22 22 23 define('FASTPIXEL_VERSION', '1.0.4 4');23 define('FASTPIXEL_VERSION', '1.0.45'); 24 24 define('FASTPIXEL_NAME', 'FastPixel'); 25 25 if (!defined('FASTPIXEL_PLUGIN_DIR')) -
fastpixel-website-accelerator/trunk/inc/backend/assets/backend.js
r3251166 r3263433 26 26 function fastpixelOnOptimizationChange(disable = true) { 27 27 if (disable) { 28 jQuery('[data-depends-on="fastpixel-javascript-optimization"]').attr(' disabled', 'disabled');29 } else { 30 jQuery('[data-depends-on="fastpixel-javascript-optimization"]').removeAttr(' disabled');28 jQuery('[data-depends-on="fastpixel-javascript-optimization"]').attr('readonly', 'readonly'); 29 } else { 30 jQuery('[data-depends-on="fastpixel-javascript-optimization"]').removeAttr('readonly'); 31 31 } 32 32 } 33 33 34 34 //adding custom event to have ability to trigger it programmatically and avoid loop triggering 35 jQuery('#fastpixel_javascript_optimization').on('fastpixelChange', function () { 36 const value = jQuery(this).val(); const disable = value == 3 ? true : false; fastpixelOnOptimizationChange(disable); 37 }); 38 jQuery('#fastpixel_javascript_optimization').on('change', function () { 35 jQuery('input[name="fastpixel_javascript_optimization"]').on('fastpixelChange', function () { 36 const checked = jQuery(this).prop('checked'); 37 if (checked) { 38 const value = jQuery(this).val(); 39 const disable = (parseInt(value) == 2 ? false : true); 40 fastpixelOnOptimizationChange(disable); 41 } 42 }); 43 jQuery('input[name="fastpixel_javascript_optimization"]').on('change', function () { 39 44 jQuery(this).trigger('fastpixelChange'); 40 45 }); -
fastpixel-website-accelerator/trunk/inc/backend/controllers/cache.php
r3255528 r3263433 13 13 protected $config; 14 14 protected $time_to_wait = 5; //need this option to avoid multiple page cache requests 15 protected $serve_stale ;15 protected $serve_stale = false; 16 16 protected $be_functions; 17 17 protected $purged_objects_cache = false; 18 protected $run_purge_for_custom_urls = false; 18 19 19 20 public function __construct() … … 27 28 28 29 29 $this->serve_stale = function_exists('get_option') ? $this->functions->get_option('fastpixel_serve_stale') :$this->config->get_option('serve_stale');30 $this->serve_stale = function_exists('get_option') ? (bool) $this->functions->get_option('fastpixel_serve_stale') : (bool) $this->config->get_option('serve_stale'); 30 31 31 32 //cache functions only for backend … … 154 155 add_action('admin_post_fastpixel_admin_delete_cached', [$this, 'admin_delete_cached_files']); 155 156 //taxonomy functions 157 add_action('created_term', function ($term, $taxonomy, $args) { 158 do_action('fastpixel/term/created', $term, $taxonomy, $args); //own hook 159 }, 10, 3); 156 160 add_action('edit_terms', function ($term_id, $taxonomy, $args) { 157 161 if ($this->debug) { … … 283 287 * Different update hooks 284 288 */ 285 add_action('wp_update_nav_menu', function(int $menu_id, array $menu_data ) {289 add_action('wp_update_nav_menu', function(int $menu_id, array $menu_data = []) { 286 290 $this->purge_all_with_message_no_request(); 287 291 }, 10, 2); // When a custom menu is update. … … 307 311 $this->purge_all_with_message_no_request(); 308 312 }, 10, 1); // When customizer is saved. 313 314 //run purge for custom urls on shutdown callback 315 add_action('fastpixel/shutdown', [$this, 'always_purge_urls'], 10); 316 //enabling purge for custom urls on post actions 317 add_action('fastpixel/post/published', [$this, 'run_purge_for_custom_urls'], 10); 318 add_action('fastpixel/post/inserted', [$this, 'run_purge_for_custom_urls'], 10); 319 add_action('fastpixel/post/draft_to_publish', [$this, 'run_purge_for_custom_urls'], 10); 320 add_action('fastpixel/post/pending_to_publish', [$this, 'run_purge_for_custom_urls'], 10); 321 add_action('fastpixel/post/trashed', [$this, 'run_purge_for_custom_urls'], 10); 322 //TOOD: check if we need always purge on terms actions 323 //enabling purge for custom urls on term actions 324 add_action('fastpixel/term/created', [$this, 'run_purge_for_custom_urls'], 10); 325 add_action('fastpixel/terms/edited', [$this, 'run_purge_for_custom_urls'], 10); 326 add_action('fastpixel/term/deleted', [$this, 'run_purge_for_custom_urls'], 10); 309 327 } 310 328 … … 561 579 //remove cache folder if serve_stale is disabled 562 580 $clear_folder = apply_filters('fastpixel/purge_all/clear_cache_folder', true); 563 $serve_stale = $this->functions->get_option('fastpixel_serve_stale');564 581 if ($this->debug) { 565 582 FASTPIXEL_DEBUG::log('Class FASTPIXEL_Backend_Cache: ACTION purge_all, clear cache directory', $clear_folder); 566 FASTPIXEL_DEBUG::log('Class FASTPIXEL_Backend_Cache: ACTION purge_all, serve stale', $ serve_stale);567 } 568 if (($clear_folder && !$ serve_stale)) {583 FASTPIXEL_DEBUG::log('Class FASTPIXEL_Backend_Cache: ACTION purge_all, serve stale', $this->serve_stale); 584 } 585 if (($clear_folder && !$this->serve_stale)) { 569 586 add_action('fastpixel/shutdown', function () { 570 587 if ($this->debug) { … … 924 941 return false; 925 942 } 943 944 public function run_purge_for_custom_urls() { 945 $this->run_purge_for_custom_urls = true; 946 } 947 948 public function always_purge_urls() { 949 //getting urls to purge 950 if ($this->run_purge_for_custom_urls) { 951 $urls_setting = $this->functions->get_option('fastpixel_always_purge_urls', []); 952 $urls = explode("\r\n", $urls_setting); 953 if (!empty($urls) && is_array($urls)) { 954 foreach($urls as $url) { 955 if (substr($url, 0, 1) != '/') { 956 continue; 957 } 958 $options = [ 959 'original_url' => $url 960 ]; 961 $full_url = new FASTPIXEL_Url(apply_filters('fastpixel/backend/always_purge_url', get_home_url(null, $url), $options)); 962 //delete cached files if serve stale is disabled(adding this to keep more free space and avoid serving cached pages) 963 if (!$this->serve_stale) { 964 $this->functions->delete_cached_files($full_url->get_url_path()); 965 } 966 $this->functions->update_post_cache($full_url->get_url_path(), true); 967 } 968 } 969 } 970 } 926 971 } 927 972 new FASTPIXEL_Backend_Cache(); -
fastpixel-website-accelerator/trunk/inc/backend/controllers/classes/post-types-statuses.php
r3255528 r3263433 21 21 $this->be_functions = FASTPIXEL_Backend_Functions::get_instance(); 22 22 //loading post types later, when all plugins and themes loaded 23 add_action(' init', function () {23 add_action('admin_init', function () { 24 24 $this->post_types = get_post_types(['public' => true], 'objects'); 25 25 $this->nonce = wp_create_nonce('cache_status_nonce'); -
fastpixel-website-accelerator/trunk/inc/backend/controllers/tabs/javascript.php
r3245943 r3263433 117 117 'field_value' => $excludes, 118 118 'label' => $args['label'], 119 'description' => $description 119 'description' => $description, 120 'data' => ['data-depends-on="fastpixel-javascript-optimization"'] 120 121 ], true); 121 122 } … … 131 132 'field_value' => $excludes, 132 133 'label' => $args['label'], 133 'description' => $description 134 'description' => $description, 135 'data' => ['data-depends-on="fastpixel-javascript-optimization"'] 134 136 ], true); 135 137 } -
fastpixel-website-accelerator/trunk/inc/backend/controllers/tabs/settings.php
r3230775 r3263433 44 44 register_setting(FASTPIXEL_TEXTDOMAIN, 'fastpixel_params_exclusions', ['type' => 'array']); 45 45 register_setting(FASTPIXEL_TEXTDOMAIN, 'fastpixel_excluded_post_types', ['type' => 'array', 'sanitize_callback' => [$this, 'sanitize_fastpixel_post_types_exclusion_cb']]); 46 register_setting(FASTPIXEL_TEXTDOMAIN, 'fastpixel_always_purge_urls', ['type' => 'array']); 46 47 // Register a new section in the "settings" page. 47 48 add_settings_section( … … 154 155 $field_title, 155 156 [$this, 'field_exclude_post_types_cb'], 157 FASTPIXEL_TEXTDOMAIN, 158 'fastpixel_settings_section', 159 [ 160 'class' => 'fastpixel-settings-form-row', 161 'label' => $field_title 162 ] 163 ); 164 165 $field_title = esc_html__('Always Purge URL(s)', 'fastpixel-website-accelerator'); 166 add_settings_field( 167 'fastpixel_always_purge_urls', 168 $field_title, 169 [$this, 'field_always_purge_urls_cb'], 156 170 FASTPIXEL_TEXTDOMAIN, 157 171 'fastpixel_settings_section', … … 324 338 } 325 339 340 public function field_always_purge_urls_cb($args) 341 { 342 // Get the value of the setting we've registered with register_setting() 343 $urls = $this->functions->get_option('fastpixel_always_purge_urls'); 344 $description = esc_html__('Page URLs that should always be purged from the cache whenever posts or plugins are added, edited, or deleted. Each URL should be added on a new line.', 'fastpixel-website-accelerator'); 345 $description .= '<br/>'; 346 $description .= esc_html__('Example: /blog/', 'fastpixel-website-accelerator'); 347 $this->be_functions->print_textarea([ 348 'field_name' => 'fastpixel_always_purge_urls', 349 'field_value' => $urls, 350 'label' => $args['label'], 351 'description' => $description, 352 'data' => [] 353 ], true); 354 } 355 326 356 public function save_options() { 327 357 if (sanitize_text_field($_SERVER['REQUEST_METHOD']) !== 'POST' || (defined('DOING_AJAX') && DOING_AJAX) || … … 343 373 //saving excludes and removing existing files if they exist 344 374 $this->save_excludes(); 375 //saving purge urls 376 $this->save_purge_urls(); 345 377 $exclude_all_params = isset($_POST['fastpixel_exclude_all_params']) && 1 == sanitize_text_field($_POST['fastpixel_exclude_all_params']) ? 1 : 0; 346 378 $this->functions->update_option('fastpixel_exclude_all_params', $exclude_all_params); … … 367 399 } 368 400 369 p ublicfunction save_excludes() {401 protected function save_excludes() { 370 402 //added extra check to avoid pcp validation notice 371 403 if (check_admin_referer('fastpixel-settings', 'fastpixel-nonce') == false) { … … 397 429 } 398 430 431 protected function save_purge_urls() 432 { 433 //added extra check to avoid pcp validation notice 434 if (check_admin_referer('fastpixel-settings', 'fastpixel-nonce') == false) { 435 return; 436 } 437 //getting old value 438 $old_values = $this->functions->get_option('fastpixel_always_purge_urls'); 439 //getting new(submitted) value 440 $new_values = sanitize_textarea_field($_POST['fastpixel_always_purge_urls']); 441 //comparing values and saving only when differs 442 if ($old_values != $new_values) { 443 //updating value 444 $this->functions->update_option('fastpixel_always_purge_urls', sanitize_textarea_field($_POST['fastpixel_always_purge_urls'])); 445 } 446 } 447 399 448 public function sanitize_fastpixel_speculation_mode($value) { 400 449 if (!in_array(sanitize_text_field($value), ['prefetch', 'prerender'])) { -
fastpixel-website-accelerator/trunk/inc/backend/controllers/ui-multi.php
r3197588 r3263433 50 50 ]); 51 51 //we can add status link when not in network admin 52 if (!is_network_admin() ) {52 if (!is_network_admin() && $this->check_network_capabilities()) { 53 53 $wp_admin_bar->add_node([ 54 54 'id' => 'fastpixel-top-' . FASTPIXEL_TEXTDOMAIN . '-status', … … 58 58 ]); 59 59 } 60 $wp_admin_bar->add_node([ 61 'id' => 'fastpixel-top-' . FASTPIXEL_TEXTDOMAIN . '-settings', 62 'parent' => 'fastpixel-top-' . FASTPIXEL_TEXTDOMAIN . '-menu', 63 'href' => esc_url(network_admin_url('admin.php?page=' . FASTPIXEL_TEXTDOMAIN . '-settings')), 64 'title' => esc_html__('Settings', 'fastpixel-website-accelerator'), 65 ]); 60 if ($this->check_network_capabilities()) { 61 $wp_admin_bar->add_node([ 62 'id' => 'fastpixel-top-' . FASTPIXEL_TEXTDOMAIN . '-settings', 63 'parent' => 'fastpixel-top-' . FASTPIXEL_TEXTDOMAIN . '-menu', 64 'href' => esc_url(network_admin_url('admin.php?page=' . FASTPIXEL_TEXTDOMAIN . '-settings')), 65 'title' => esc_html__('Settings', 'fastpixel-website-accelerator'), 66 ]); 67 } 66 68 $this->admin_bar_purge_button($wp_admin_bar); //there can be button for purge single post/page/taxonomy/author/archive 67 69 $wp_admin_bar->add_node([ … … 73 75 } 74 76 75 p ublic function check_capabilities()77 protected function check_network_capabilities() 76 78 { 77 79 // check user capabilities -
fastpixel-website-accelerator/trunk/inc/backend/models/diag-tests/config-file.php
r3083183 r3263433 12 12 protected $display_notifications = false; 13 13 protected $visible_on_diagnostics_page = false; 14 14 protected $functions; 15 protected $config_file; 15 16 16 17 public function __construct() { 17 18 parent::__construct(); 19 $this->functions = FASTPIXEL_Functions::get_instance(); 20 $this->config_file = FASTPIXEL_Config_Model::get_instance(); 18 21 } 19 22 … … 23 26 $options = ['fastpixel_serve_stale', 'fastpixel_display_cached_for_logged', 'fastpixel_cache_lifetime']; 24 27 $modified = false; 25 $functions = FASTPIXEL_Functions::get_instance(); 26 $config_file = FASTPIXEL_Config_Model::get_instance(); 28 27 29 foreach ($options as $option_name) { 28 $option_value = $ functions->get_option($option_name, false);29 if ($ config_file->get_option($option_name) != $option_value) {30 $ config_file->set_option($option_name, $option_value);30 $option_value = $this->functions->get_option($option_name, false); 31 if ($this->config_file->get_option($option_name) != $option_value) { 32 $this->config_file->set_option($option_name, $option_value); 31 33 $modified = true; 32 34 } 33 35 } 36 if ($this->check_permalinks()) { 37 $modified = true; 38 } 39 if ($this->check_wpml()) { 40 $modified = true; 41 } 34 42 if ($modified) { 35 $ config_file->save_file();43 $this->config_file->save_file(); 36 44 } 37 45 } … … 44 52 $this->name = esc_html__('Configuration File', 'fastpixel-website-accelerator'); 45 53 } 54 55 protected function check_permalinks() { 56 //skip check when multisite 57 if (function_exists('is_multisite') && is_multisite()) { 58 return false; 59 } 60 //check permalinks 61 $modified = false; 62 $permalink_stucture = $this->functions->get_option('permalink_structure'); 63 if (preg_match('/\/$/', $permalink_stucture)) { 64 if ($this->config_file->get_option('fastpixel_force_trailing_slash') != true) { 65 $this->config_file->set_option('fastpixel_force_trailing_slash', true); 66 $modified = true; 67 } 68 } else { 69 if ($this->config_file->get_option('fastpixel_force_trailing_slash') != false) { 70 $this->config_file->set_option('fastpixel_force_trailing_slash', false); 71 $modified = true; 72 } 73 } 74 return $modified; 75 } 76 77 protected function check_wpml() { 78 //probably WPML should not be used with multisite 79 if (function_exists('is_multisite') && is_multisite()) { 80 return false; 81 } 82 $force_redirect_for_default_language = $this->config_file->get_option('fastpixel_wpml_use_directory_for_default_language'); 83 //if wpml is enabled 84 if (defined('ICL_SITEPRESS_VERSION')) { 85 $settings = get_option('icl_sitepress_settings'); 86 $use_directory = false; 87 if (!empty($settings['urls']['directory_for_default_language'])) { 88 $use_directory = $settings['urls']['directory_for_default_language']; 89 } 90 if ($use_directory == true && $force_redirect_for_default_language == false) { 91 $this->config_file->set_option('fastpixel_wpml_use_directory_for_default_language', true); 92 return true; 93 } elseif ($use_directory == false && $force_redirect_for_default_language == true) { 94 $this->config_file->set_option('fastpixel_wpml_use_directory_for_default_language', false); 95 return true; 96 } 97 return false; 98 } else { 99 if ($force_redirect_for_default_language == true) { 100 $this->config_file->set_option('fastpixel_wpml_use_directory_for_default_language', false); 101 return true; 102 } 103 } 104 } 46 105 } 47 106 new FASTPIXEL_Diag_Test_Config(); -
fastpixel-website-accelerator/trunk/inc/backend/models/ui.php
r3245943 r3263433 209 209 public function status_page() 210 210 { 211 if (!$this->check_capabilities()) {212 return;213 }214 211 echo '<hr class="wp-header-end"><hr class="fastpixel-header-hr"><div class="wrap fastpixel-website-accelerator-wrap">'; 215 echo wp_kses($this->header(), $this->allowed_tags); 216 foreach ($this->tabs as $tab) { 217 if (!in_array($tab->get_slug(), array('cache-status')) || !$tab->is_enabled()) { 218 continue; 219 } 220 $tab->view(); 212 if ($this->check_capabilities()) { 213 echo wp_kses($this->header(), $this->allowed_tags); 214 foreach ($this->tabs as $tab) { 215 if (!in_array($tab->get_slug(), array('cache-status')) || !$tab->is_enabled()) { 216 continue; 217 } 218 $tab->view(); 219 } 220 } else { 221 echo '<h1>' . esc_html__('You do not have sufficient permissions to access this page.', 'fastpixel-website-accelerator') . '</h1>'; 221 222 } 222 223 echo '</div>'; -
fastpixel-website-accelerator/trunk/inc/classes/excluded-file-extensions.php
r3209416 r3263433 26 26 'xml', 27 27 'xsl', 28 'pdf', 28 29 //fonts 29 30 'woff', … … 35 36 'css', 36 37 //javascript 37 'js' 38 'js', 39 //archives 40 'zip', 41 'rar', 42 'tar', 43 'gz', 44 '7z', 45 //audio video 46 'mp3', 47 'mp4', 48 'avi', 49 'mov', 50 'wmv', 51 'flv', 52 'swf', 53 'webm', 54 'm4v', 55 'mkv', 56 'm4a', 57 'wav', 58 'ogg', 59 'flac', 60 'aac', 61 'wma', 62 'aiff', 63 'mpg', 64 'mpeg', 65 //other 66 'json', 67 'csv', 68 'xls', 69 'map' 38 70 ]; 39 71 -
fastpixel-website-accelerator/trunk/inc/classes/excluded-url-params.php
r3245943 r3263433 37 37 'tagverify' => '', // site kit by google 38 38 'wc-ajax' => '', // WooCommerce 39 'bfwkey' => '' 39 40 ]; 40 41 -
fastpixel-website-accelerator/trunk/inc/classes/excluded-urls.php
r3245943 r3263433 24 24 $this->config = FASTPIXEL_Config_Model::get_instance(); 25 25 add_filter('fastpixel/init/excluded', [$this, 'is_excluded'], 13, 2); 26 add_filter('fastpixel/init/excluded', [$this, 'is_excluded_by_trailing_slash'], 8, 2); 27 add_filter('fastpixel/init/excluded', [$this, 'is_excluded_by_wpml'], 14, 2); 26 28 if (is_admin()) { 27 29 add_filter('fastpixel/backend_functions/cache_status_display/excluded', [$this, 'admin_check_is_excluded'], 13, 2); … … 116 118 return $status; 117 119 } 120 121 public function is_excluded_by_trailing_slash($excluded, $url) { 122 if ($excluded == true) { 123 return $excluded; 124 } 125 if (!$this->is_home()) { 126 //temporary solution, if multisite then skip check 127 if (is_multisite()) { 128 return $excluded; 129 } 130 $force = $this->config->get_option('fastpixel_force_trailing_slash'); 131 if ($force && !preg_match('/\/$/', $url->get_path())) { //case when we need to force trailing slash and url does not have it 132 return true; 133 } 134 if (!$force && preg_match('/\/$/', $url->get_path())) { //case when we need to force no trailing slash and url has it 135 return true; 136 } 137 } 138 return false; 139 } 140 141 public function is_excluded_by_wpml($excluded, $url) 142 { 143 if ($excluded == true) { 144 return $excluded; 145 } 146 /** 147 * checking excluded urls 148 */ 149 150 $use_directory = $this->config->get_option('fastpixel_wpml_use_directory_for_default_language'); 151 if ($use_directory && $this->is_home()) { 152 return true; //we need to redirect homepage to directory, example / -> /en/ 153 } 154 return false; 155 } 156 157 protected function is_home() 158 { 159 if (!empty($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] == '/') { 160 return true; 161 } 162 return false; 163 } 118 164 } 119 165 new FASTPIXEL_Excluded_Urls(); -
fastpixel-website-accelerator/trunk/inc/classes/request.php
r3223801 r3263433 222 222 //checking if wpml is installed and url format is different domain 223 223 if ($this->functions->get_option('fastpixel_skip_url_match', false) || (function_exists('is_multisite') && is_multisite())) { 224 FASTPIXEL_DEBUG::log('REQUEST Class: fastpixel_skip_url_match is set, skipping url match'); 224 if ($this->debug_request) { 225 FASTPIXEL_DEBUG::log('REQUEST Class: fastpixel_skip_url_match is set, skipping url match'); 226 } 225 227 return true; 226 228 } -
fastpixel-website-accelerator/trunk/inc/config-model.php
r3179548 r3263433 9 9 public static $instance; 10 10 protected $options = [ 11 'fastpixel_serve_stale' => false, 12 'fastpixel_display_cached_for_logged' => false, 13 'fastpixel_javascript_optimization' => 1, //1 => 'optimize', 2 => 'delaycritical', 3 => 'donotoptimize' 14 'fastpixel_cache_lifetime' => 1, //1 => unlimited, 2 => 24H, 3 => 12H 15 'fastpixel_enabled_modules' => [], 16 'fastpixel_exclusions' => false, 17 'fastpixel_exclude_all_params' => false, 18 'fastpixel_params_exclusions' => false 11 'fastpixel_serve_stale' => false, 12 'fastpixel_display_cached_for_logged' => false, 13 'fastpixel_javascript_optimization' => 1, //1 => 'optimize', 2 => 'delaycritical', 3 => 'donotoptimize' 14 'fastpixel_cache_lifetime' => 1, //1 => unlimited, 2 => 24H, 3 => 12H 15 'fastpixel_enabled_modules' => [], 16 'fastpixel_exclusions' => false, 17 'fastpixel_exclude_all_params' => false, 18 'fastpixel_params_exclusions' => false, 19 'fastpixel_force_trailing_slash' => true, //used in single site install, usually is set to true 20 'fastpixel_wpml_use_directory_for_default_language' => false 19 21 ]; 20 22 protected $config_dir; … … 108 110 } 109 111 } 110 111 112 } 113 $this->check_permalinks(); 112 114 } 113 115 $this->save_file(); … … 130 132 return false; 131 133 } 134 135 protected function check_permalinks() { 136 //check permalinks 137 if (function_exists('is_multisite') && is_multisite()) { 138 return false; 139 } 140 $permalink_stucture = $this->functions->get_option('permalink_structure'); 141 if (preg_match('/\/$/', $permalink_stucture)) { 142 $this->set_option('fastpixel_force_trailing_slash', true); 143 } else { 144 $this->set_option('fastpixel_force_trailing_slash', false); 145 } 146 } 132 147 } 133 148 } -
fastpixel-website-accelerator/trunk/inc/url.php
r3255528 r3263433 227 227 public function get_url() { 228 228 //temporary done dynamic url generation 229 return $this->scheme . '://' . $this->host . (!empty($this->port) ? $this->port : '') . (!empty($this->path) ? rtrim($this->path, '/') : '') . '/'. (!empty($this->query) ? '?' . $this->query : '');229 return $this->scheme . '://' . $this->host . (!empty($this->port) ? $this->port : '') . $this->path . (!empty($this->query) ? '?' . $this->query : ''); 230 230 } 231 231 public function get_host() { -
fastpixel-website-accelerator/trunk/readme.txt
r3255528 r3263433 5 5 Tested up to: 6.7 6 6 Requires PHP: 5.6 7 Stable tag: 1.0.4 47 Stable tag: 1.0.45 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 201 201 == Changelog == 202 202 203 = 1.0.45 = 204 205 🌐 The Smart Purge Update 206 207 Release Date: March 28, 2025 208 209 ✨ New Features 210 211 * Always Purge URL(s): You can now define specific page URLs that should always be purged from the cache whenever posts, pages, or plugins are added, edited, or removed. Perfect for keeping key landing pages and dynamic content fresh! 212 213 🤝 Compatibility Improvements 214 215 * WPML Support Enhanced: Added redirect patches to improve compatibility with multilingual setups using WPML. 216 * Affiliate Parameter Handling: Improved support for affiliate tracking parameters to ensure they don’t interfere with caching or optimization. 217 218 🛠️ Bug Fixes 219 220 * Various under-the-hood bugfixes to improve stability and performance. 221 203 222 🔄 The Smarter Cache Update 204 223 -
fastpixel-website-accelerator/trunk/vendor/composer/installed.php
r3255528 r3263433 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 12cc62107ef979074d4d13b1b8f3619fcb393a19',6 'reference' => '4ae102c19a31b655483cb166294205f6a3e9a784', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 12cc62107ef979074d4d13b1b8f3619fcb393a19',16 'reference' => '4ae102c19a31b655483cb166294205f6a3e9a784', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.