Changeset 3249438
- Timestamp:
- 03/03/2025 07:19:54 AM (13 months ago)
- Location:
- rabbit-loader
- Files:
-
- 1 added
- 11 edited
- 11 copied
-
tags/2.22.4 (added)
-
tags/2.22.4/admin (copied) (copied from rabbit-loader/trunk/admin)
-
tags/2.22.4/advanced-cache.php (copied) (copied from rabbit-loader/trunk/advanced-cache.php)
-
tags/2.22.4/assets (copied) (copied from rabbit-loader/trunk/assets)
-
tags/2.22.4/autoload.php (copied) (copied from rabbit-loader/trunk/autoload.php) (1 diff)
-
tags/2.22.4/images (copied) (copied from rabbit-loader/trunk/images)
-
tags/2.22.4/inc (copied) (copied from rabbit-loader/trunk/inc)
-
tags/2.22.4/inc/RabbitLoader/SDK/API.php (modified) (2 diffs)
-
tags/2.22.4/inc/RabbitLoader/SDK/Request.php (modified) (4 diffs)
-
tags/2.22.4/inc/rl_can_url.php (modified) (1 diff)
-
tags/2.22.4/inc/tab_init.php (modified) (1 diff)
-
tags/2.22.4/index.php (copied) (copied from rabbit-loader/trunk/index.php)
-
tags/2.22.4/rabbit-loader.php (copied) (copied from rabbit-loader/trunk/rabbit-loader.php) (1 diff)
-
tags/2.22.4/readme.txt (copied) (copied from rabbit-loader/trunk/readme.txt) (2 diffs)
-
tags/2.22.4/uninstall.php (copied) (copied from rabbit-loader/trunk/uninstall.php)
-
tags/2.22.4/wp-cli.php (copied) (copied from rabbit-loader/trunk/wp-cli.php)
-
trunk/autoload.php (modified) (1 diff)
-
trunk/inc/RabbitLoader/SDK/API.php (modified) (2 diffs)
-
trunk/inc/RabbitLoader/SDK/Request.php (modified) (4 diffs)
-
trunk/inc/rl_can_url.php (modified) (1 diff)
-
trunk/inc/tab_init.php (modified) (1 diff)
-
trunk/rabbit-loader.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rabbit-loader/tags/2.22.4/autoload.php
r3246412 r3249438 4 4 define('RABBITLOADER_CACHE_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . "rabbitloader"); 5 5 define('RABBITLOADER_PLUG_URL', plugin_dir_url(__FILE__)); 6 define('RABBITLOADER_PLUG_VERSION', '2.22. 3');6 define('RABBITLOADER_PLUG_VERSION', '2.22.4'); 7 7 define('RABBITLOADER_TEXT_DOMAIN', 'rabbit-loader'); 8 8 define('RABBITLOADER_PLUG_ENV', 'PROD'); -
rabbit-loader/tags/2.22.4/inc/RabbitLoader/SDK/API.php
r3200547 r3249438 38 38 'url' => $url 39 39 ]; 40 $httpCode = 0; 40 41 try { 41 42 if (!$cf->exists(Cache::TTL_SHORT)) { … … 76 77 if ($this->debug) { 77 78 Util::sendHeader('x-rl-refresh: finish', true); 79 Util::sendHeader('x-rl-httpCode: ' . $httpCode, true); 78 80 } 79 81 return $response; -
rabbit-loader/tags/2.22.4/inc/RabbitLoader/SDK/Request.php
r3217480 r3249438 22 22 private $platform = []; 23 23 24 const EC429 = ['BQE', 'EC224', 'EC230', 'EC232']; 25 24 26 const IG_PARAMS = ['_gl', 'epik', 'fbclid', 'gbraid', 'gclid', 'msclkid', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term', 'vgo_ee', 'wbraid', 'zenid', 'rltest', 'rlrand']; 25 27 … … 38 40 'plugin_cms' => 'php-sdk', 39 41 'cms_v' => defined('PHP_VERSION') ? PHP_VERSION : '', 40 'plugin_v' => '1.0. 9'42 'plugin_v' => '1.0.11' 41 43 ]; 42 44 } … … 77 79 public function skipForPaths($patterns) 78 80 { 79 if (!empty($patterns)) { 80 foreach ($patterns as $i => $path_pattern) { 81 if (!empty($path_pattern) && !empty($this->requestURI)) { 82 $matched = fnmatch(trim($path_pattern), trim($this->requestURI)); 83 if (!$matched) { 84 $matched = fnmatch(trim($path_pattern), rawurldecode($this->requestURI)); 85 } 86 if (!$matched) { 87 $matched = fnmatch($path_pattern, rawurldecode($this->requestURI)); 88 } 89 if ($matched) { 90 $this->ignoreRequest("skip-path-$path_pattern"); 91 break; 92 } 93 } 81 if (empty($patterns) || empty($this->requestURI)) { 82 return; 83 } 84 #fnmatch(): the maximum allowed length for filename is 4096 characters 85 $uriRaw = substr($this->requestURI, 0, 4096); 86 $uriDecoded = substr(rawurldecode($this->requestURI), 0, 4096); 87 88 foreach ($patterns as $path_pattern) { 89 if (empty($path_pattern)) { 90 continue; 91 } 92 93 $path_pattern = trim($path_pattern); 94 if (fnmatch($path_pattern, $uriRaw) || fnmatch($path_pattern, $uriDecoded)) { 95 $this->ignoreRequest("skip-path-$path_pattern"); 96 break; 94 97 } 95 98 } … … 368 371 Util::sendHeader('x-rl-refresh-saved: 1', true); 369 372 } else { 370 $this->cacheFile->set429();371 373 if (!empty($response['message'])) { 372 Util::sendHeader('x-rl-debug-refresh1:' . $resJson, true); 373 if (strcasecmp($response['message'], 'BQE') === 0) { 374 Util::sendHeader('x-rl-debug-refresh3:' . $resJson, true); 375 if (in_array($response['message'], self::EC429)) { 376 $this->cacheFile->set429(); 377 } 378 if ($response['message'] === 'BQE' || $response['message'] === 'EC224') { 374 379 $this->cacheFile->deleteAll(); 375 380 } 381 } else { 382 Util::sendHeader('x-rl-res-msg-empty: 1', true); 376 383 } 377 384 } -
rabbit-loader/tags/2.22.4/inc/rl_can_url.php
r2805552 r3249438 1 1 <?php 2 2 3 if (class_exists('RabbitLoader_21_CanonicalUrl')){4 #it seems we have a conflict5 return;3 if (class_exists('RabbitLoader_21_CanonicalUrl')) { 4 #it seems we have a conflict 5 return; 6 6 } 7 7 /** 8 8 * WordPress adds canonical meta tag for single post, but not for homepage, paginated pages etc. 9 9 */ 10 class RabbitLoader_21_CanonicalUrl { 10 class RabbitLoader_21_CanonicalUrl 11 { 11 12 12 public static function init() { 13 add_action( 'wp_head', 'RabbitLoader_21_CanonicalUrl::addCanonical', 5); 13 public static function init() 14 { 15 add_action('wp_head', 'RabbitLoader_21_CanonicalUrl::addCanonical', 5); 14 16 } 15 17 16 public static function addCanonical() { 17 if (is_singular()) { 18 //we don't need to add it, WP already adds it 18 public static function addCanonical() 19 { 20 if (is_singular()) { 21 //we don't need to add it, WP already adds it 19 22 return ''; 20 23 } 21 try{ 22 $can_url = ''; 23 if ( is_home()) { 24 $can_url = self::get_home_canonical_url(); 25 } elseif ( is_post_type_archive()) { 26 $can_url = self::get_post_type_archive_canonical_url(); 27 } elseif ( is_author()) { 28 $can_url = self::get_author_url(); 29 }elseif ( is_tax() || is_category() || is_tag()) { 30 $can_url = self::get_term_canonical_url(); 31 } 32 33 if (!empty($can_url)) { 34 if(is_wp_error($can_url)){ 35 RabbitLoader_21_Core::on_exception($can_url); 36 }else{ 37 echo '<meta name="rl:url" content="', esc_url( $can_url ), '" />',"\n"; 24 try { 25 $can_url = ''; 26 if (is_home()) { 27 $can_url = self::get_home_canonical_url(); 28 } elseif (is_post_type_archive()) { 29 $can_url = self::get_post_type_archive_canonical_url(); 30 } elseif (is_author()) { 31 $can_url = self::get_author_url(); 32 } elseif (is_tax() || is_category() || is_tag()) { 33 $can_url = self::get_term_canonical_url(); 34 } 35 36 if (!empty($can_url)) { 37 if (is_wp_error($can_url)) { 38 //ignore empty term errors 39 //RabbitLoader_21_Core::on_exception($can_url); 40 } else { 41 echo '<meta name="rl:url" content="', esc_url($can_url), '" />', "\n"; 38 42 } 39 }40 }catch(Throwable $e){41 RabbitLoader_21_Core::on_exception($e);42 }43 } 44 } catch (Throwable $e) { 45 RabbitLoader_21_Core::on_exception($e); 46 } 43 47 } 44 48 45 private static function get_home_canonical_url() { 46 $can_url= is_front_page() ? home_url( '/' ) : get_permalink( get_queried_object()); 49 private static function get_home_canonical_url() 50 { 51 $can_url = is_front_page() ? home_url('/') : get_permalink(get_queried_object()); 47 52 return self::get_paginated_url($can_url); 48 53 } 49 54 50 public static function get_term_canonical_url() { 51 $can_url= get_term_link( get_queried_object()); 55 public static function get_term_canonical_url() 56 { 57 $can_url = get_term_link(get_queried_object()); 52 58 return self::get_paginated_url($can_url); 53 59 } 54 60 55 private static function get_post_type_archive_canonical_url() { 56 $can_url= get_post_type_archive_link(get_post_type()); 61 private static function get_post_type_archive_canonical_url() 62 { 63 $can_url = get_post_type_archive_link(get_post_type()); 57 64 return self::get_paginated_url($can_url); 58 65 } 59 66 60 private static function get_author_url() { 61 $can_url= get_author_posts_url( get_queried_object_id()); 67 private static function get_author_url() 68 { 69 $can_url = get_author_posts_url(get_queried_object_id()); 62 70 return self::get_paginated_url($can_url); 63 71 } 64 72 65 private static function get_paginated_url( $can_url) { 73 private static function get_paginated_url($can_url) 74 { 66 75 $paged = get_query_var('paged'); 67 if ( $paged < 2) {76 if ($paged < 2) { 68 77 return $can_url; 69 78 } 70 if (get_option('permalink_structure') == '') {71 $can_url = add_query_arg('paged', $paged, $can_url);79 if (get_option('permalink_structure') == '') { 80 $can_url = add_query_arg('paged', $paged, $can_url); 72 81 } else { 73 $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');82 $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged'); 74 83 } 75 84 return $can_url; -
rabbit-loader/tags/2.22.4/inc/tab_init.php
r3233695 r3249438 310 310 protected static function getUpgradeLink($utm_term, $plan_title) 311 311 { 312 return esc_url(RabbitLoader_21_Core::getRLBaseDomain() . " pricing/?utm_source=wordpress&utm_medium=plugin&utm_term=$utm_term&utm_content=$utm_term#domain=". urlencode(get_home_url()) . "/");312 return esc_url(RabbitLoader_21_Core::getRLBaseDomain() . "account/?utm_source=wordpress&utm_medium=plugin&utm_term=$utm_term&utm_content=$utm_term&action=upgrade&domain_id=" . RabbitLoader_21_Core::getWpOptVal('did') . '&domain_name=' . urlencode(get_home_url()) . "/"); 313 313 } 314 314 -
rabbit-loader/tags/2.22.4/rabbit-loader.php
r3246412 r3249438 7 7 * Author URI: https://rabbitloader.com/ 8 8 * Description: RabbitLoader can improve Google PageSpeed score and get you 100 out of 100 by improving the page load time to just a few milliseconds. It improves the Core Web Vitals score for your pages and boost PageSpeed score to help better search rankings and best the experience for your end user. 9 * Version: 2.22. 39 * Version: 2.22.4 10 10 * Text Domain: rabbit-loader 11 11 */ -
rabbit-loader/tags/2.22.4/readme.txt
r3246412 r3249438 5 5 Requires at least: 4.7 6 6 Tested up to: 6.7.1 7 Stable tag: 2.22. 37 Stable tag: 2.22.4 8 8 Requires PHP: 5.6 9 9 License: GNU General Public License, version 2 … … 219 219 == Changelog == 220 220 221 = 2.22.4 = 222 * Performance improvements 223 * Easy flow for plan upgrades 224 221 225 = 2.22.3 = 222 226 * Compatibility with MonsterInsights – Google Analytics Dashboard for WordPress plugin -
rabbit-loader/trunk/autoload.php
r3233695 r3249438 4 4 define('RABBITLOADER_CACHE_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . "rabbitloader"); 5 5 define('RABBITLOADER_PLUG_URL', plugin_dir_url(__FILE__)); 6 define('RABBITLOADER_PLUG_VERSION', '2.22. 3');6 define('RABBITLOADER_PLUG_VERSION', '2.22.4'); 7 7 define('RABBITLOADER_TEXT_DOMAIN', 'rabbit-loader'); 8 8 define('RABBITLOADER_PLUG_ENV', 'PROD'); -
rabbit-loader/trunk/inc/RabbitLoader/SDK/API.php
r3200547 r3249438 38 38 'url' => $url 39 39 ]; 40 $httpCode = 0; 40 41 try { 41 42 if (!$cf->exists(Cache::TTL_SHORT)) { … … 76 77 if ($this->debug) { 77 78 Util::sendHeader('x-rl-refresh: finish', true); 79 Util::sendHeader('x-rl-httpCode: ' . $httpCode, true); 78 80 } 79 81 return $response; -
rabbit-loader/trunk/inc/RabbitLoader/SDK/Request.php
r3217480 r3249438 22 22 private $platform = []; 23 23 24 const EC429 = ['BQE', 'EC224', 'EC230', 'EC232']; 25 24 26 const IG_PARAMS = ['_gl', 'epik', 'fbclid', 'gbraid', 'gclid', 'msclkid', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term', 'vgo_ee', 'wbraid', 'zenid', 'rltest', 'rlrand']; 25 27 … … 38 40 'plugin_cms' => 'php-sdk', 39 41 'cms_v' => defined('PHP_VERSION') ? PHP_VERSION : '', 40 'plugin_v' => '1.0. 9'42 'plugin_v' => '1.0.11' 41 43 ]; 42 44 } … … 77 79 public function skipForPaths($patterns) 78 80 { 79 if (!empty($patterns)) { 80 foreach ($patterns as $i => $path_pattern) { 81 if (!empty($path_pattern) && !empty($this->requestURI)) { 82 $matched = fnmatch(trim($path_pattern), trim($this->requestURI)); 83 if (!$matched) { 84 $matched = fnmatch(trim($path_pattern), rawurldecode($this->requestURI)); 85 } 86 if (!$matched) { 87 $matched = fnmatch($path_pattern, rawurldecode($this->requestURI)); 88 } 89 if ($matched) { 90 $this->ignoreRequest("skip-path-$path_pattern"); 91 break; 92 } 93 } 81 if (empty($patterns) || empty($this->requestURI)) { 82 return; 83 } 84 #fnmatch(): the maximum allowed length for filename is 4096 characters 85 $uriRaw = substr($this->requestURI, 0, 4096); 86 $uriDecoded = substr(rawurldecode($this->requestURI), 0, 4096); 87 88 foreach ($patterns as $path_pattern) { 89 if (empty($path_pattern)) { 90 continue; 91 } 92 93 $path_pattern = trim($path_pattern); 94 if (fnmatch($path_pattern, $uriRaw) || fnmatch($path_pattern, $uriDecoded)) { 95 $this->ignoreRequest("skip-path-$path_pattern"); 96 break; 94 97 } 95 98 } … … 368 371 Util::sendHeader('x-rl-refresh-saved: 1', true); 369 372 } else { 370 $this->cacheFile->set429();371 373 if (!empty($response['message'])) { 372 Util::sendHeader('x-rl-debug-refresh1:' . $resJson, true); 373 if (strcasecmp($response['message'], 'BQE') === 0) { 374 Util::sendHeader('x-rl-debug-refresh3:' . $resJson, true); 375 if (in_array($response['message'], self::EC429)) { 376 $this->cacheFile->set429(); 377 } 378 if ($response['message'] === 'BQE' || $response['message'] === 'EC224') { 374 379 $this->cacheFile->deleteAll(); 375 380 } 381 } else { 382 Util::sendHeader('x-rl-res-msg-empty: 1', true); 376 383 } 377 384 } -
rabbit-loader/trunk/inc/rl_can_url.php
r2805552 r3249438 1 1 <?php 2 2 3 if (class_exists('RabbitLoader_21_CanonicalUrl')){4 #it seems we have a conflict5 return;3 if (class_exists('RabbitLoader_21_CanonicalUrl')) { 4 #it seems we have a conflict 5 return; 6 6 } 7 7 /** 8 8 * WordPress adds canonical meta tag for single post, but not for homepage, paginated pages etc. 9 9 */ 10 class RabbitLoader_21_CanonicalUrl { 10 class RabbitLoader_21_CanonicalUrl 11 { 11 12 12 public static function init() { 13 add_action( 'wp_head', 'RabbitLoader_21_CanonicalUrl::addCanonical', 5); 13 public static function init() 14 { 15 add_action('wp_head', 'RabbitLoader_21_CanonicalUrl::addCanonical', 5); 14 16 } 15 17 16 public static function addCanonical() { 17 if (is_singular()) { 18 //we don't need to add it, WP already adds it 18 public static function addCanonical() 19 { 20 if (is_singular()) { 21 //we don't need to add it, WP already adds it 19 22 return ''; 20 23 } 21 try{ 22 $can_url = ''; 23 if ( is_home()) { 24 $can_url = self::get_home_canonical_url(); 25 } elseif ( is_post_type_archive()) { 26 $can_url = self::get_post_type_archive_canonical_url(); 27 } elseif ( is_author()) { 28 $can_url = self::get_author_url(); 29 }elseif ( is_tax() || is_category() || is_tag()) { 30 $can_url = self::get_term_canonical_url(); 31 } 32 33 if (!empty($can_url)) { 34 if(is_wp_error($can_url)){ 35 RabbitLoader_21_Core::on_exception($can_url); 36 }else{ 37 echo '<meta name="rl:url" content="', esc_url( $can_url ), '" />',"\n"; 24 try { 25 $can_url = ''; 26 if (is_home()) { 27 $can_url = self::get_home_canonical_url(); 28 } elseif (is_post_type_archive()) { 29 $can_url = self::get_post_type_archive_canonical_url(); 30 } elseif (is_author()) { 31 $can_url = self::get_author_url(); 32 } elseif (is_tax() || is_category() || is_tag()) { 33 $can_url = self::get_term_canonical_url(); 34 } 35 36 if (!empty($can_url)) { 37 if (is_wp_error($can_url)) { 38 //ignore empty term errors 39 //RabbitLoader_21_Core::on_exception($can_url); 40 } else { 41 echo '<meta name="rl:url" content="', esc_url($can_url), '" />', "\n"; 38 42 } 39 }40 }catch(Throwable $e){41 RabbitLoader_21_Core::on_exception($e);42 }43 } 44 } catch (Throwable $e) { 45 RabbitLoader_21_Core::on_exception($e); 46 } 43 47 } 44 48 45 private static function get_home_canonical_url() { 46 $can_url= is_front_page() ? home_url( '/' ) : get_permalink( get_queried_object()); 49 private static function get_home_canonical_url() 50 { 51 $can_url = is_front_page() ? home_url('/') : get_permalink(get_queried_object()); 47 52 return self::get_paginated_url($can_url); 48 53 } 49 54 50 public static function get_term_canonical_url() { 51 $can_url= get_term_link( get_queried_object()); 55 public static function get_term_canonical_url() 56 { 57 $can_url = get_term_link(get_queried_object()); 52 58 return self::get_paginated_url($can_url); 53 59 } 54 60 55 private static function get_post_type_archive_canonical_url() { 56 $can_url= get_post_type_archive_link(get_post_type()); 61 private static function get_post_type_archive_canonical_url() 62 { 63 $can_url = get_post_type_archive_link(get_post_type()); 57 64 return self::get_paginated_url($can_url); 58 65 } 59 66 60 private static function get_author_url() { 61 $can_url= get_author_posts_url( get_queried_object_id()); 67 private static function get_author_url() 68 { 69 $can_url = get_author_posts_url(get_queried_object_id()); 62 70 return self::get_paginated_url($can_url); 63 71 } 64 72 65 private static function get_paginated_url( $can_url) { 73 private static function get_paginated_url($can_url) 74 { 66 75 $paged = get_query_var('paged'); 67 if ( $paged < 2) {76 if ($paged < 2) { 68 77 return $can_url; 69 78 } 70 if (get_option('permalink_structure') == '') {71 $can_url = add_query_arg('paged', $paged, $can_url);79 if (get_option('permalink_structure') == '') { 80 $can_url = add_query_arg('paged', $paged, $can_url); 72 81 } else { 73 $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');82 $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged'); 74 83 } 75 84 return $can_url; -
rabbit-loader/trunk/inc/tab_init.php
r3233695 r3249438 310 310 protected static function getUpgradeLink($utm_term, $plan_title) 311 311 { 312 return esc_url(RabbitLoader_21_Core::getRLBaseDomain() . " pricing/?utm_source=wordpress&utm_medium=plugin&utm_term=$utm_term&utm_content=$utm_term#domain=". urlencode(get_home_url()) . "/");312 return esc_url(RabbitLoader_21_Core::getRLBaseDomain() . "account/?utm_source=wordpress&utm_medium=plugin&utm_term=$utm_term&utm_content=$utm_term&action=upgrade&domain_id=" . RabbitLoader_21_Core::getWpOptVal('did') . '&domain_name=' . urlencode(get_home_url()) . "/"); 313 313 } 314 314 -
rabbit-loader/trunk/rabbit-loader.php
r3233695 r3249438 7 7 * Author URI: https://rabbitloader.com/ 8 8 * Description: RabbitLoader can improve Google PageSpeed score and get you 100 out of 100 by improving the page load time to just a few milliseconds. It improves the Core Web Vitals score for your pages and boost PageSpeed score to help better search rankings and best the experience for your end user. 9 * Version: 2.22. 39 * Version: 2.22.4 10 10 * Text Domain: rabbit-loader 11 11 */ -
rabbit-loader/trunk/readme.txt
r3233695 r3249438 5 5 Requires at least: 4.7 6 6 Tested up to: 6.7.1 7 Stable tag: 2.22. 37 Stable tag: 2.22.4 8 8 Requires PHP: 5.6 9 9 License: GNU General Public License, version 2 … … 219 219 == Changelog == 220 220 221 = 2.22.4 = 222 * Performance improvements 223 * Easy flow for plan upgrades 224 221 225 = 2.22.3 = 222 226 * Compatibility with MonsterInsights – Google Analytics Dashboard for WordPress plugin
Note: See TracChangeset
for help on using the changeset viewer.