Plugin Directory

Changeset 2943546

Timestamp:
07/26/2023 10:18:28 AM (12 months ago)
Author:
khorshidlab
Message:

Plugin Version 0.9.7

Location:
arvancloud-cdn
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • arvancloud-cdn/tags/0.9.7/README.txt

    r2856630 r2943546  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 0.9.6
     7Stable tag: 0.9.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656
    5757== Changelog ==
     58
     59
     60
    5861= 0.9.6 - 2023-01-18 =
    5962* Minor improvements - Update URLs
  • arvancloud-cdn/tags/0.9.7/admin/inc/CDN/class-domain-auto-add.php

    r2788597 r2943546  
    5050    public function request_from_arvan_to_add_domain(){
    5151
     52
     53
     54
    5255        if ( !Helper::is_domain_belongs_to_api() )
    5356        {
     
    6265                'domain_type'=>'full'
    6366            );
     67
     68
     69
    6470
    65             Request_Arvan::post('domains/dns-service', json_encode($data));
     71                helper::show_admin_notice(__('Error retrieve data from cloud' ,'arvancloud-cdn'));
     72                return;
     73            }
     74
    6675        }
     76
    6777
    6878    }
     
    98108    private function get_domain_list_from_arvan(){
    99109
    100         $response = json_decode(wp_remote_retrieve_body(Request_Arvan::get('domains', false)));
     110        try {
     111            $response = json_decode(wp_remote_retrieve_body(Request_Arvan::get('domains', false)));
     112        }catch (Exception $e){
    101113
     114
     115
     116
    102117        if( !isset($response->data) )
    103118            return;
  • arvancloud-cdn/tags/0.9.7/admin/inc/CDN/class-domain-info.php

    r2733504 r2943546  
    2222    {
    2323        self::$info         = self::get_domain_info();
    24         self::$DNS_Cloud    = self::$info['dns_cloud'];
     24        self::$DNS_Cloud    = self::$info['dns_cloud'];
    2525        self::$plan_level   = self::$info['plan_level'] ?? false;
    2626    }
  • arvancloud-cdn/tags/0.9.7/admin/inc/CDN/class-reports.php

    r2733504 r2943546  
    129129
    130130        $report = $this->get_report($endpoint, $period);
     131
     132
    131133        $this->period = $period;
    132134
  • arvancloud-cdn/tags/0.9.7/admin/inc/Security/class-firewall.php

    r2733504 r2943546  
    196196
    197197    public function set_props() {
     198
     199
    198200        $this->default_rule = $this->data['default_action'];
    199201        $this->verify_sni   = $this->data['verify_sni'];
  • arvancloud-cdn/tags/0.9.7/admin/inc/Security/class-https-settings.php

    r2777664 r2943546  
    136136
    137137    public function set_props() {
     138
     139
    138140        $this->is_HTTPS         = $this->data['ssl_status'];
    139141        $this->is_HTTPS_Default = $this->data['https_redirect'];
  • arvancloud-cdn/tags/0.9.7/admin/views/cache/caching_settings.php

    r2752685 r2943546  
    44$options = Caching_Settings::get_options();
    55if(!$options || !isset($options['cache_status'])) {
    6     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     6    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    77}
    88
    9 $cache_status = $options['cache_status'];
     9$cache_status = $options['cache_status'];
    1010
    1111$expiration_times = [
  • arvancloud-cdn/tags/0.9.7/admin/views/options-display.php

    r2752685 r2943546  
    66$options = CDN_Options::get_cdn_options();
    77if(!$options) {
    8     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     8    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    99}
    10 $development_mode = $options ? $options['cache_developer_mode'] : false;
    11 $cache_consistent_uptime = $options ? $options['cache_consistent_uptime'] : false;
     10$development_mode = $options ? : false;
     11$cache_consistent_uptime = $options ? : false;
    1212$nonce_purge_cache = wp_create_nonce('arvan_purge_cache');
    1313
  • arvancloud-cdn/tags/0.9.7/admin/views/security/ddos_protection.php

    r2752685 r2943546  
    1414
    1515if(empty($mode)) {
    16     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     16    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    1717}
    1818
  • arvancloud-cdn/tags/0.9.7/admin/views/settings-display.php

    r2850501 r2943546  
    1313            <div class="ar-cdn-box">
    1414                <label for="accdn-api-key">API Key</label>
    15                 <input type="text" name="accdn-api-key" value="" autocomplete="off" placeholder="<?php echo !empty($credentials_status) ? esc_html_e( "-- not shown --", 'arvancloud-cdn' ) : 'Apikey ********-****-****-****-************' ?> ">
     15                <input type="text" name="accdn-api-key" value="" autocomplete="off" placeholder="<?php echo !empty($credentials_status) ? esc_html_e( "-- not shown --", 'arvancloud-cdn' ) : 'Apikey ********-****-****-****-************' ?> ">
    1616            </div>
    1717            <div class="ar-cdn-box">
    18                 <a class="get-api-key" href="https://panel.arvancloud.ir/profile/api-keys" target="_blank" rel="noopener noreferrer"><?php echo esc_html_e('Get API Key', 'arvancloud-cdn'); ?></a>
     18                <a class="get-api-key" href="https://panel.arvancloud.ir/profile/" target="_blank" rel="noopener noreferrer"><?php echo esc_html_e('Get API Key', 'arvancloud-cdn'); ?></a>
    1919            </div>
    2020            <p><button type="submit" class="button button-primary" name="config_arvancloud_api_key" value="1"><?php echo esc_html_e( "Save", 'arvancloud-cdn' ) ?></button></p>
  • arvancloud-cdn/tags/0.9.7/wp-arvancloud-cdn.php

    r2850501 r2943546  
    1111 * Plugin URI:        https://www.arvancloud.ir/fa/products/cdn
    1212 * Description:       ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time.
    13  * Version:           0.9.6
     13 * Version:           0.9.
    1414 * Requires PHP:      7.2
    1515 * Author:            Khorshid, ArvanCloud
     
    2626}
    2727
    28 define( 'ACCDN_VERSION', '0.9.6' );
     28define( 'ACCDN_VERSION', '0.9.' );
    2929define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) );
    3030define( 'ACCDN_SLUG', 'arvancloud-cdn');
     
    3737 * Currently plugin version.
    3838 */
    39 define( 'WP_ARVANCLOUD_CDN_VERSION', '0.9.6' );
     39define( 'WP_ARVANCLOUD_CDN_VERSION', '0.9.' );
    4040
    4141/**
  • arvancloud-cdn/trunk/README.txt

    r2856630 r2943546  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 0.9.6
     7Stable tag: 0.9.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656
    5757== Changelog ==
     58
     59
     60
    5861= 0.9.6 - 2023-01-18 =
    5962* Minor improvements - Update URLs
  • arvancloud-cdn/trunk/admin/inc/CDN/class-domain-auto-add.php

    r2788597 r2943546  
    5050    public function request_from_arvan_to_add_domain(){
    5151
     52
     53
     54
    5255        if ( !Helper::is_domain_belongs_to_api() )
    5356        {
     
    6265                'domain_type'=>'full'
    6366            );
     67
     68
     69
    6470
    65             Request_Arvan::post('domains/dns-service', json_encode($data));
     71                helper::show_admin_notice(__('Error retrieve data from cloud' ,'arvancloud-cdn'));
     72                return;
     73            }
     74
    6675        }
     76
    6777
    6878    }
     
    98108    private function get_domain_list_from_arvan(){
    99109
    100         $response = json_decode(wp_remote_retrieve_body(Request_Arvan::get('domains', false)));
     110        try {
     111            $response = json_decode(wp_remote_retrieve_body(Request_Arvan::get('domains', false)));
     112        }catch (Exception $e){
    101113
     114
     115
     116
    102117        if( !isset($response->data) )
    103118            return;
  • arvancloud-cdn/trunk/admin/inc/CDN/class-domain-info.php

    r2733504 r2943546  
    2222    {
    2323        self::$info         = self::get_domain_info();
    24         self::$DNS_Cloud    = self::$info['dns_cloud'];
     24        self::$DNS_Cloud    = self::$info['dns_cloud'];
    2525        self::$plan_level   = self::$info['plan_level'] ?? false;
    2626    }
  • arvancloud-cdn/trunk/admin/inc/CDN/class-reports.php

    r2733504 r2943546  
    129129
    130130        $report = $this->get_report($endpoint, $period);
     131
     132
    131133        $this->period = $period;
    132134
  • arvancloud-cdn/trunk/admin/inc/Security/class-firewall.php

    r2733504 r2943546  
    196196
    197197    public function set_props() {
     198
     199
    198200        $this->default_rule = $this->data['default_action'];
    199201        $this->verify_sni   = $this->data['verify_sni'];
  • arvancloud-cdn/trunk/admin/inc/Security/class-https-settings.php

    r2777664 r2943546  
    136136
    137137    public function set_props() {
     138
     139
    138140        $this->is_HTTPS         = $this->data['ssl_status'];
    139141        $this->is_HTTPS_Default = $this->data['https_redirect'];
  • arvancloud-cdn/trunk/admin/views/cache/caching_settings.php

    r2752685 r2943546  
    44$options = Caching_Settings::get_options();
    55if(!$options || !isset($options['cache_status'])) {
    6     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     6    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    77}
    88
    9 $cache_status = $options['cache_status'];
     9$cache_status = $options['cache_status'];
    1010
    1111$expiration_times = [
  • arvancloud-cdn/trunk/admin/views/options-display.php

    r2752685 r2943546  
    66$options = CDN_Options::get_cdn_options();
    77if(!$options) {
    8     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     8    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    99}
    10 $development_mode = $options ? $options['cache_developer_mode'] : false;
    11 $cache_consistent_uptime = $options ? $options['cache_consistent_uptime'] : false;
     10$development_mode = $options ? : false;
     11$cache_consistent_uptime = $options ? : false;
    1212$nonce_purge_cache = wp_create_nonce('arvan_purge_cache');
    1313
  • arvancloud-cdn/trunk/admin/views/security/ddos_protection.php

    r2752685 r2943546  
    1414
    1515if(empty($mode)) {
    16     wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
     16    wp_safe_redirect( esc_url( admin_url( '/admin.php?page=arvancloud-cdn' ) ) );
    1717}
    1818
  • arvancloud-cdn/trunk/admin/views/settings-display.php

    r2850501 r2943546  
    1313            <div class="ar-cdn-box">
    1414                <label for="accdn-api-key">API Key</label>
    15                 <input type="text" name="accdn-api-key" value="" autocomplete="off" placeholder="<?php echo !empty($credentials_status) ? esc_html_e( "-- not shown --", 'arvancloud-cdn' ) : 'Apikey ********-****-****-****-************' ?> ">
     15                <input type="text" name="accdn-api-key" value="" autocomplete="off" placeholder="<?php echo !empty($credentials_status) ? esc_html_e( "-- not shown --", 'arvancloud-cdn' ) : 'Apikey ********-****-****-****-************' ?> ">
    1616            </div>
    1717            <div class="ar-cdn-box">
    18                 <a class="get-api-key" href="https://panel.arvancloud.ir/profile/api-keys" target="_blank" rel="noopener noreferrer"><?php echo esc_html_e('Get API Key', 'arvancloud-cdn'); ?></a>
     18                <a class="get-api-key" href="https://panel.arvancloud.ir/profile/" target="_blank" rel="noopener noreferrer"><?php echo esc_html_e('Get API Key', 'arvancloud-cdn'); ?></a>
    1919            </div>
    2020            <p><button type="submit" class="button button-primary" name="config_arvancloud_api_key" value="1"><?php echo esc_html_e( "Save", 'arvancloud-cdn' ) ?></button></p>
  • arvancloud-cdn/trunk/wp-arvancloud-cdn.php

    r2850501 r2943546  
    1111 * Plugin URI:        https://www.arvancloud.ir/fa/products/cdn
    1212 * Description:       ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time.
    13  * Version:           0.9.6
     13 * Version:           0.9.
    1414 * Requires PHP:      7.2
    1515 * Author:            Khorshid, ArvanCloud
     
    2626}
    2727
    28 define( 'ACCDN_VERSION', '0.9.6' );
     28define( 'ACCDN_VERSION', '0.9.' );
    2929define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) );
    3030define( 'ACCDN_SLUG', 'arvancloud-cdn');
     
    3737 * Currently plugin version.
    3838 */
    39 define( 'WP_ARVANCLOUD_CDN_VERSION', '0.9.6' );
     39define( 'WP_ARVANCLOUD_CDN_VERSION', '0.9.' );
    4040
    4141/**
Note: See TracChangeset for help on using the changeset viewer.