Plugin Directory

Changeset 3345194


Ignore:
Timestamp:
08/15/2025 02:23:56 PM (8 months ago)
Author:
devozon
Message:

Prepare trunk for v2.7.0

Location:
fense-block-vpn-proxy
Files:
86 added
6 edited

Legend:

Unmodified
Added
Removed
  • fense-block-vpn-proxy/trunk/fense-bpvt.php

    r3342511 r3345194  
    3535 * Plugin URI:        https://fense.in/
    3636 * Description:       With Fense You can easily Protect Your ads and Website From Bad Traffic that Leads To Destroy Your Rank and Force Ad Network To Close Your Account.
    37  * Version:           2.6.0
     37 * Version:           2.7.0
    3838 * Author:            Devozon
    3939 * Author URI:        https://devozon.com/
     
    4949}
    5050
    51 const FENSE_BPVT_VERSION = '2.6.0';
     51const FENSE_BPVT_VERSION = '2.7.0';
    5252const FENSE_BPVT_API_LINK = 'https://api.fense.in/';
    5353const FENSE_BPVT_MAIN_LINK = 'https://fense.in/';
  • fense-block-vpn-proxy/trunk/includes/core/class-fense-bpvt-run-save-mode.php

    r3342511 r3345194  
    8080        $this->ip = $this->Fense_FUN->get_the_user_ip();
    8181       
     82        return $this->ip;
     83    }
     84   
     85    public function isCache(): array
     86    {
    8287        /**  Load Data From Cache if Exists */
    8388        $Gip = get_transient( 'bpvt_ip_' . md5( $this->AppKey . '_' . $this->ip ) );
     
    8792        if ( time() < $expires ) {
    8893           
    89             return null;
    90         }
    91        
    92         return $this->ip;
     94            /** add ip data from cache to var */
     95            $this->ipData = $Gip['data'];
     96           
     97            /** check if country is blocked  */
     98            $country = $this->__country();
     99           
     100            return [ 'stop' => true, 'isProxy' => $country['isProxy'] ];
     101        }
     102       
     103        return [ 'stop' => false, 'isProxy' => false ];
    93104    }
    94105   
  • fense-block-vpn-proxy/trunk/includes/core/class-fense-bpvt-run.php

    r3342511 r3345194  
    8080        $this->ip = $this->Fense_FUN->get_the_user_ip();
    8181       
     82        return $this->ip;
     83    }
     84   
     85    public function isCache(): bool
     86    {
    8287        /**  Load Data From Cache if Exists */
    8388        $Gip = get_transient( 'bpvt_ip_' . md5( $this->AppKey . '_' . $this->ip ) );
     
    8792        if ( time() < $expires ) {
    8893           
     94            /** add header code for ads block */
    8995            if ( esc_attr( get_option( 'FENSE_BPVT_DEVOZON_protection_mode' ) ) == 'show_content' ) {
    9096                add_action( 'wp_head', 'FENSE_BPVT_header_code' );
    9197            }
    9298           
    93             return null;
    94         }
    95        
    96         return $this->ip;
     99            /** add ip data from cache to var */
     100            $this->ipData = $Gip['data'];
     101           
     102            /** check if country is blocked  */
     103            $this->__country();
     104           
     105            return true;
     106        }
     107       
     108        return false;
    97109    }
    98110   
  • fense-block-vpn-proxy/trunk/includes/system/fense-bpvt-api-call.php

    r3342511 r3345194  
    5858    if ( !$RUN->loadSettings()->enable ) return null;
    5959   
     60    /** Exit if Plugin Cache Exists */
     61    if ( $RUN->isCache() ) return null;
     62   
    6063    /** Handle IP Whitelisting, Blacklisting Settings */
    6164    if ( $RUN->__ipHandleWhitelistBlacklist() ) return true;
  • fense-block-vpn-proxy/trunk/includes/system/fense-bpvt-cache-safe-mode.php

    r3342511 r3345194  
    6565        /** Exit if Plugin is Disabled */
    6666        if ( !$SaveMode->loadSettings()->enable ) return $this->success();
     67       
     68        /** Handle cache is exists */
     69        if ( $SaveMode->isCache()['stop'] ) return $this->success( $SaveMode->__country()['isProxy'] );
    6770       
    6871        /** Handle IP Whitelisting, Blacklisting Settings */
  • fense-block-vpn-proxy/trunk/readme.txt

    r3342511 r3345194  
    55Tested up to: 6.8.2
    66Requires PHP: 7.4
    7 Stable tag: 2.6.0
     7Stable tag: 2.7.0
    88License: GPLv2
    99
Note: See TracChangeset for help on using the changeset viewer.