Plugin Directory

Changeset 3249438


Ignore:
Timestamp:
03/03/2025 07:19:54 AM (13 months ago)
Author:
sanrl
Message:

v 2.22.4 release

Location:
rabbit-loader
Files:
1 added
11 edited
11 copied

Legend:

Unmodified
Added
Removed
  • rabbit-loader/tags/2.22.4/autoload.php

    r3246412 r3249438  
    44define('RABBITLOADER_CACHE_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . "rabbitloader");
    55define('RABBITLOADER_PLUG_URL', plugin_dir_url(__FILE__));
    6 define('RABBITLOADER_PLUG_VERSION', '2.22.3');
     6define('RABBITLOADER_PLUG_VERSION', '2.22.4');
    77define('RABBITLOADER_TEXT_DOMAIN', 'rabbit-loader');
    88define('RABBITLOADER_PLUG_ENV', 'PROD');
  • rabbit-loader/tags/2.22.4/inc/RabbitLoader/SDK/API.php

    r3200547 r3249438  
    3838            'url' => $url
    3939        ];
     40        $httpCode = 0;
    4041        try {
    4142            if (!$cf->exists(Cache::TTL_SHORT)) {
     
    7677        if ($this->debug) {
    7778            Util::sendHeader('x-rl-refresh: finish', true);
     79            Util::sendHeader('x-rl-httpCode: ' . $httpCode, true);
    7880        }
    7981        return $response;
  • rabbit-loader/tags/2.22.4/inc/RabbitLoader/SDK/Request.php

    r3217480 r3249438  
    2222    private $platform = [];
    2323
     24    const EC429 = ['BQE', 'EC224', 'EC230', 'EC232'];
     25
    2426    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'];
    2527
     
    3840            'plugin_cms' => 'php-sdk',
    3941            'cms_v' => defined('PHP_VERSION') ? PHP_VERSION : '',
    40             'plugin_v' => '1.0.9'
     42            'plugin_v' => '1.0.11'
    4143        ];
    4244    }
     
    7779    public function skipForPaths($patterns)
    7880    {
    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;
    9497            }
    9598        }
     
    368371            Util::sendHeader('x-rl-refresh-saved: 1', true);
    369372        } else {
    370             $this->cacheFile->set429();
    371373            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') {
    374379                    $this->cacheFile->deleteAll();
    375380                }
     381            } else {
     382                Util::sendHeader('x-rl-res-msg-empty: 1', true);
    376383            }
    377384        }
  • rabbit-loader/tags/2.22.4/inc/rl_can_url.php

    r2805552 r3249438  
    11<?php
    22
    3 if(class_exists('RabbitLoader_21_CanonicalUrl')){
    4     #it seems we have a conflict
    5     return;
     3if (class_exists('RabbitLoader_21_CanonicalUrl')) {
     4    #it seems we have a conflict
     5    return;
    66}
    77/**
    88 * WordPress adds canonical meta tag for single post, but not for homepage, paginated pages etc.
    99 */
    10 class RabbitLoader_21_CanonicalUrl {
     10class RabbitLoader_21_CanonicalUrl
     11{
    1112
    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);
    1416    }
    1517
    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
    1922            return '';
    2023        }
    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";
    3842                }
    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        }
    4347    }
    4448
    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());
    4752        return self::get_paginated_url($can_url);
    4853    }
    4954
    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());
    5258        return self::get_paginated_url($can_url);
    5359    }
    5460
    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());
    5764        return self::get_paginated_url($can_url);
    5865    }
    5966
    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());
    6270        return self::get_paginated_url($can_url);
    6371    }
    6472
    65     private static function get_paginated_url( $can_url) {
     73    private static function get_paginated_url($can_url)
     74    {
    6675        $paged = get_query_var('paged');
    67         if ( $paged < 2 ) {
     76        if ($paged < 2) {
    6877            return $can_url;
    6978        }
    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);
    7281        } else {
    73             $can_url= trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');
     82            $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');
    7483        }
    7584        return $can_url;
  • rabbit-loader/tags/2.22.4/inc/tab_init.php

    r3233695 r3249438  
    310310    protected static function getUpgradeLink($utm_term, $plan_title)
    311311    {
    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()) . "/");
    313313    }
    314314
  • rabbit-loader/tags/2.22.4/rabbit-loader.php

    r3246412 r3249438  
    77 * Author URI:   https://rabbitloader.com/
    88 * 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.3
     9 * Version: 2.22.4
    1010 * Text Domain: rabbit-loader
    1111 */
  • rabbit-loader/tags/2.22.4/readme.txt

    r3246412 r3249438  
    55Requires at least: 4.7
    66Tested up to: 6.7.1
    7 Stable tag: 2.22.3
     7Stable tag: 2.22.4
    88Requires PHP: 5.6
    99License: GNU General Public License, version 2
     
    219219== Changelog ==
    220220
     221= 2.22.4 =
     222* Performance improvements
     223* Easy flow for plan upgrades
     224
    221225= 2.22.3 =
    222226* Compatibility with MonsterInsights – Google Analytics Dashboard for WordPress plugin
  • rabbit-loader/trunk/autoload.php

    r3233695 r3249438  
    44define('RABBITLOADER_CACHE_DIR', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . "rabbitloader");
    55define('RABBITLOADER_PLUG_URL', plugin_dir_url(__FILE__));
    6 define('RABBITLOADER_PLUG_VERSION', '2.22.3');
     6define('RABBITLOADER_PLUG_VERSION', '2.22.4');
    77define('RABBITLOADER_TEXT_DOMAIN', 'rabbit-loader');
    88define('RABBITLOADER_PLUG_ENV', 'PROD');
  • rabbit-loader/trunk/inc/RabbitLoader/SDK/API.php

    r3200547 r3249438  
    3838            'url' => $url
    3939        ];
     40        $httpCode = 0;
    4041        try {
    4142            if (!$cf->exists(Cache::TTL_SHORT)) {
     
    7677        if ($this->debug) {
    7778            Util::sendHeader('x-rl-refresh: finish', true);
     79            Util::sendHeader('x-rl-httpCode: ' . $httpCode, true);
    7880        }
    7981        return $response;
  • rabbit-loader/trunk/inc/RabbitLoader/SDK/Request.php

    r3217480 r3249438  
    2222    private $platform = [];
    2323
     24    const EC429 = ['BQE', 'EC224', 'EC230', 'EC232'];
     25
    2426    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'];
    2527
     
    3840            'plugin_cms' => 'php-sdk',
    3941            'cms_v' => defined('PHP_VERSION') ? PHP_VERSION : '',
    40             'plugin_v' => '1.0.9'
     42            'plugin_v' => '1.0.11'
    4143        ];
    4244    }
     
    7779    public function skipForPaths($patterns)
    7880    {
    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;
    9497            }
    9598        }
     
    368371            Util::sendHeader('x-rl-refresh-saved: 1', true);
    369372        } else {
    370             $this->cacheFile->set429();
    371373            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') {
    374379                    $this->cacheFile->deleteAll();
    375380                }
     381            } else {
     382                Util::sendHeader('x-rl-res-msg-empty: 1', true);
    376383            }
    377384        }
  • rabbit-loader/trunk/inc/rl_can_url.php

    r2805552 r3249438  
    11<?php
    22
    3 if(class_exists('RabbitLoader_21_CanonicalUrl')){
    4     #it seems we have a conflict
    5     return;
     3if (class_exists('RabbitLoader_21_CanonicalUrl')) {
     4    #it seems we have a conflict
     5    return;
    66}
    77/**
    88 * WordPress adds canonical meta tag for single post, but not for homepage, paginated pages etc.
    99 */
    10 class RabbitLoader_21_CanonicalUrl {
     10class RabbitLoader_21_CanonicalUrl
     11{
    1112
    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);
    1416    }
    1517
    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
    1922            return '';
    2023        }
    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";
    3842                }
    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        }
    4347    }
    4448
    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());
    4752        return self::get_paginated_url($can_url);
    4853    }
    4954
    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());
    5258        return self::get_paginated_url($can_url);
    5359    }
    5460
    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());
    5764        return self::get_paginated_url($can_url);
    5865    }
    5966
    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());
    6270        return self::get_paginated_url($can_url);
    6371    }
    6472
    65     private static function get_paginated_url( $can_url) {
     73    private static function get_paginated_url($can_url)
     74    {
    6675        $paged = get_query_var('paged');
    67         if ( $paged < 2 ) {
     76        if ($paged < 2) {
    6877            return $can_url;
    6978        }
    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);
    7281        } else {
    73             $can_url= trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');
     82            $can_url = trailingslashit($can_url) . 'page/' . user_trailingslashit($paged, 'paged');
    7483        }
    7584        return $can_url;
  • rabbit-loader/trunk/inc/tab_init.php

    r3233695 r3249438  
    310310    protected static function getUpgradeLink($utm_term, $plan_title)
    311311    {
    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()) . "/");
    313313    }
    314314
  • rabbit-loader/trunk/rabbit-loader.php

    r3233695 r3249438  
    77 * Author URI:   https://rabbitloader.com/
    88 * 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.3
     9 * Version: 2.22.4
    1010 * Text Domain: rabbit-loader
    1111 */
  • rabbit-loader/trunk/readme.txt

    r3233695 r3249438  
    55Requires at least: 4.7
    66Tested up to: 6.7.1
    7 Stable tag: 2.22.3
     7Stable tag: 2.22.4
    88Requires PHP: 5.6
    99License: GNU General Public License, version 2
     
    219219== Changelog ==
    220220
     221= 2.22.4 =
     222* Performance improvements
     223* Easy flow for plan upgrades
     224
    221225= 2.22.3 =
    222226* Compatibility with MonsterInsights – Google Analytics Dashboard for WordPress plugin
Note: See TracChangeset for help on using the changeset viewer.