Plugin Directory

Changeset 3182762


Ignore:
Timestamp:
11/06/2024 12:44:24 AM (16 months ago)
Author:
wpvivid
Message:

Update for mainwp extension 0.9.38 trunk

Location:
wpvivid-backup-mainwp/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wpvivid-backup-mainwp/trunk/admin/wpvivid-backup-mainwp-backuprestorepage.php

    r3100853 r3182762  
    32523252                }
    32533253                else{
    3254                     $slug = $white_label_setting['white_label_slug'];
     3254                    $slug = strtolower($white_label_setting['white_label_slug']);
    32553255                    $slug_page = strtolower($white_label_setting['white_label_slug']);
    32563256                    if($is_mu)
     
    36913691                }
    36923692                else{
    3693                     $slug = $white_label_setting['white_label_slug'];
     3693                    $slug = strtolower($white_label_setting['white_label_slug']);
    36943694                    $slug_page = strtolower($white_label_setting['white_label_slug']);
    36953695                    if($is_mu)
     
    40514051                }
    40524052                else{
    4053                     $slug = $white_label_setting['white_label_slug'];
     4053                    $slug = strtolower($white_label_setting['white_label_slug']);
    40544054                    $slug_page = strtolower($white_label_setting['white_label_slug']);
    40554055                    if($is_mu)
     
    45914591                }
    45924592                else{
    4593                     $slug = $white_label_setting['white_label_slug'];
     4593                    $slug = strtolower($white_label_setting['white_label_slug']);
    45944594                    $slug_page = strtolower($white_label_setting['white_label_slug']);
    45954595                    if($is_mu)
  • wpvivid-backup-mainwp/trunk/admin/wpvivid-backup-mainwp-incremental-backup.php

    r3051197 r3182762  
    936936                    $ret['backup_to']='local';
    937937                }
    938                 if(isset($schedule_data['backup']['remote_options']))
     938
     939                if(isset($schedule_data['backup']['remote_id']))
     940                {
     941                    $remote_id = $schedule_data['backup']['remote_id'];
     942                    $ret['remote_options'][$remote_id] = array();
     943                }
     944                else if(isset($schedule_data['backup']['remote_options']))
    939945                {
    940946                    $ret['remote_options'] = $schedule_data['backup']['remote_options'];
  • wpvivid-backup-mainwp/trunk/admin/wpvivid-backup-mainwp-settingpage.php

    r3141352 r3182762  
    3333        add_action('wp_ajax_mwp_wpvivid_set_global_general_setting', array($this, 'set_global_general_setting'));
    3434        add_action('wp_ajax_mwp_wpvivid_sync_setting', array($this, 'sync_setting'));
     35        add_action('wp_ajax_mwp_wpvivid_achieve_rollback_remote_addon', array($this, 'achieve_rollback_remote_addon'));
     36        add_action('wp_ajax_mwp_wpvivid_export_setting_addon', array($this, 'export_setting_addon'));
     37        add_action('wp_ajax_mwp_wpvivid_import_setting_addon', array($this, 'import_setting_addon'));
     38    }
     39
     40    public function export_setting_addon()
     41    {
     42        global $mainwp_wpvivid_extension_activator;
     43        $mainwp_wpvivid_extension_activator->mwp_ajax_check_security();
     44        try{
     45            $json['plugin']='WPvivid-Mainwp-Extension';
     46            $json['data']['settings_addon']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('settings_addon', array());
     47            $json['data']['schedule_mould_addon']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('schedule_mould_addon', array());
     48            $json['data']['incremental_backup_setting']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('incremental_backup_setting', array());
     49            $json['data']['remote_addon']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('remote_addon', array());
     50            $json['data']['menu_capability']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('menu_capability', array());
     51            $json['data']['white_label_setting']=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('white_label_setting', array());
     52
     53            $parse = wp_parse_url(home_url());
     54            $path = '';
     55            if(isset($parse['path'])) {
     56                $parse['path'] = str_replace('/', '_', $parse['path']);
     57                $parse['path'] = str_replace('.', '_', $parse['path']);
     58                $path = $parse['path'];
     59            }
     60            $parse['host'] = str_replace('/', '_', $parse['host']);
     61            $parse['host'] = str_replace('.', '_', $parse['host']);
     62            $domain_tran = $parse['host'].$path;
     63            $offset=get_option('gmt_offset');
     64            $date_format = gmdate("Ymd",time()+$offset*60*60);
     65            $time_format = gmdate("His",time()+$offset*60*60);
     66            $export_file_name = 'wpvivid_mainwp_setting-'.$domain_tran.'-'.$date_format.'-'.$time_format.'.json';
     67            if (!headers_sent()) {
     68                header('Content-Disposition: attachment; filename='.$export_file_name);
     69                header('Content-Type: application/force-download');
     70                header('Content-Description: File Transfer');
     71                header('Cache-Control: must-revalidate');
     72                header('Content-Transfer-Encoding: binary');
     73            }
     74
     75            echo wp_json_encode($json);
     76        }
     77        catch (Exception $error) {
     78            $message = 'An exception has occurred. class: '.get_class($error).';msg: '.$error->getMessage().';code: '.$error->getCode().';line: '.$error->getLine().';in_file: '.$error->getFile().';';
     79            error_log($message);
     80            echo wp_json_encode(array('result'=>'failed','error'=>$message));
     81            die();
     82        }
     83        exit;
     84    }
     85
     86    public function import_setting_addon()
     87    {
     88        global $mainwp_wpvivid_extension_activator;
     89        $mainwp_wpvivid_extension_activator->mwp_ajax_check_security();
     90        try{
     91            if (isset($_POST['data']) && !empty($_POST['data']) && is_string($_POST['data'])) {
     92                $data = sanitize_text_field($_POST['data']);
     93                $data = stripslashes($data);
     94                $json = json_decode($data, true);
     95                if (is_null($json)) {
     96                    die();
     97                }
     98                if (json_last_error() === JSON_ERROR_NONE && is_array($json) && array_key_exists('plugin', $json) && $json['plugin'] == 'WPvivid-Mainwp-Extension') {
     99                    foreach ($json['data'] as $option_name=>$option)
     100                    {
     101                        Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_update_global_option($option_name, $option);
     102                    }
     103                    $ret['result'] = 'success';
     104                    echo wp_json_encode($ret);
     105                } else {
     106                    $ret['result'] = 'failed';
     107                    $ret['error'] = __('The selected file is not the setting file for WPvivid. Please upload the right file.', 'wpvivid-backuprestore');
     108                    echo wp_json_encode($ret);
     109                }
     110            }
     111            die();
     112        }
     113        catch (Exception $error) {
     114            $message = 'An exception has occurred. class: '.get_class($error).';msg: '.$error->getMessage().';code: '.$error->getCode().';line: '.$error->getLine().';in_file: '.$error->getFile().';';
     115            error_log($message);
     116            echo wp_json_encode(array('result'=>'failed','error'=>$message));
     117            die();
     118        }
     119    }
     120
     121    public function achieve_rollback_remote_addon()
     122    {
     123        global $mainwp_wpvivid_extension_activator;
     124        $mainwp_wpvivid_extension_activator->mwp_ajax_check_security();
     125        try{
     126            if (isset($_POST['site_id']) && !empty($_POST['site_id']) && is_string($_POST['site_id'])){
     127                $site_id = sanitize_key($_POST['site_id']);
     128                $post_data['mwp_action'] = 'wpvivid_achieve_rollback_remote_addon_mainwp';
     129                $information = apply_filters('mainwp_fetchurlauthed', $mainwp_wpvivid_extension_activator->childFile, $mainwp_wpvivid_extension_activator->childKey, $site_id, 'wpvivid_backuprestore', $post_data);
     130                if (isset($information['error'])) {
     131                    $ret['result'] = 'failed';
     132                    $ret['error'] = $information['error'];
     133                } else {
     134                    $ret['result'] = 'success';
     135                    if(isset($information['wpvivid_remote_list']) && !empty($information['wpvivid_remote_list']))
     136                    {
     137                        $remote_list = $information['wpvivid_remote_list'];
     138                    }
     139                    else
     140                    {
     141                        $remote_list = array();
     142                    }
     143                    $ret['remote_list_html'] = Mainwp_WPvivid_Extension_Subpage::output_rollback_remote_list_addon($site_id, $remote_list);
     144                }
     145                echo wp_json_encode($ret);
     146            }
     147            die();
     148        }
     149        catch (Exception $error) {
     150            $message = 'An exception has occurred. class: '.get_class($error).';msg: '.$error->getMessage().';code: '.$error->getCode().';line: '.$error->getLine().';in_file: '.$error->getFile().';';
     151            error_log($message);
     152            echo wp_json_encode(array('result'=>'failed','error'=>$message));
     153            die();
     154        }
    35155    }
    36156
     
    213333                    $setting_data['wpvivid_auto_backup_db_before_update']=$rollback_setting['mwp_wpvivid_auto_backup_db_before_update_addon'];
    214334                    $setting_data['wpvivid_common_setting']['rollback_max_backup_count'] = $rollback_setting['mwp_wpvivid_rollback_max_backup_count_addon'];
     335
     336
     337                    $setting_data['wpvivid_common_setting']['rollback_max_remote_backup_count'] = $rollback_setting['mwp_wpvivid_rollback_max_remote_backup_count_addon'];
     338                    $setting_data['wpvivid_rollback_retain_local'] = $rollback_setting['mwp_wpvivid_rollback_retain_local_addon'];
     339                    if($rollback_setting['mwp_wpvivid_manual_backup_remote_selector'] == '-1')
     340                    {
     341                        $setting_data['wpvivid_rollback_remote'] = 0;
     342                    }
     343                    else
     344                    {
     345                        $setting_data['wpvivid_rollback_remote'] = 1;
     346                        $setting_data['wpvivid_rollback_remote_id'] = $rollback_setting['mwp_wpvivid_manual_backup_remote_selector'];
     347                    }
     348
    215349                }
    216350
     
    436570                    $setting_data['wpvivid_auto_backup_db_before_update']=$rollback_setting['mwp_wpvivid_auto_backup_db_before_update_addon'];
    437571                    $setting_data['wpvivid_common_setting']['rollback_max_backup_count'] = $rollback_setting['mwp_wpvivid_rollback_max_backup_count_addon'];
     572                    $setting_data['wpvivid_common_setting']['rollback_max_remote_backup_count'] = $rollback_setting['mwp_wpvivid_rollback_max_remote_backup_count_addon'];
     573                    $setting_data['wpvivid_rollback_retain_local'] = $rollback_setting['mwp_wpvivid_rollback_retain_local_addon'];
     574                    if($rollback_setting['mwp_wpvivid_manual_backup_remote_selector'] == '-1')
     575                    {
     576                        $setting_data['wpvivid_rollback_remote'] = 0;
     577                    }
     578                    else
     579                    {
     580                        $setting_data['wpvivid_rollback_remote'] = 1;
     581                    }
    438582                }
    439583
     
    801945                    'site_id': '<?php echo esc_html($this->site_id); ?>'
    802946                };
    803 
    804947                jQuery('#mwp_wpvivid_setting_general_save_addon').css({'pointer-events': 'none', 'opacity': '0.4'});
    805948                mwp_wpvivid_post_request(ajax_data, function (data) {
     
    9261069                jQuery(obj).parents("tr:first").remove();
    9271070            }
     1071
     1072            function mwp_wpvivid_export_settings() {
     1073                location.href =ajaxurl+'?_wpnonce='+ajax_object.ajax_nonce+'&action=mwp_wpvivid_export_setting_addon';
     1074            }
     1075
     1076            jQuery('#mwp_wpvivid_setting_export').click(function(){
     1077                mwp_wpvivid_export_settings();
     1078            });
     1079
     1080            function mwp_wpvivid_import_settings(){
     1081                var files = jQuery('input[name="fileTrans"]').prop('files');
     1082
     1083                if(files.length == 0){
     1084                    alert('Choose a settings file and import it by clicking Import button.');
     1085                    return;
     1086                }
     1087                else{
     1088                    var reader = new FileReader();
     1089                    reader.readAsText(files[0], "UTF-8");
     1090                    reader.onload = function(evt){
     1091                        var fileString = evt.target.result;
     1092                        var ajax_data = {
     1093                            'action': 'mwp_wpvivid_import_setting_addon',
     1094                            'data': fileString
     1095                        };
     1096                        mwp_wpvivid_post_request(ajax_data, function(data){
     1097                            try {
     1098                                var jsonarray = jQuery.parseJSON(data);
     1099                                if (jsonarray.result === 'success') {
     1100                                    alert('The plugin settings were imported successfully.');
     1101                                    location.reload();
     1102                                }
     1103                                else {
     1104                                    alert('Error: ' + jsonarray.error);
     1105                                }
     1106                            }
     1107                            catch(err){
     1108                                alert(err);
     1109                            }
     1110                        }, function(XMLHttpRequest, textStatus, errorThrown) {
     1111                            var error_message = mwp_wpvivid_output_ajaxerror('importing the previously-exported settings', textStatus, errorThrown);
     1112                            alert(error_message);
     1113                        });
     1114                    }
     1115                }
     1116            }
     1117
     1118            jQuery('#mwp_wpvivid_setting_import').click(function(){
     1119                mwp_wpvivid_import_settings();
     1120            });
    9281121        </script>
    9291122        <?php
     
    12961489                                </p>
    12971490                            </div>
     1491                        </td>
     1492                    </tr>
     1493
     1494                    <tr>
     1495                        <td class="row-title" style="min-width:200px;"><label for="tablecell">Export/Import Extension Settings</label></td>
     1496                        <td>
     1497                            <table class="widefat" style="border:none;box-shadow:none;">
     1498                                <tr>
     1499                                    <td>
     1500                                        <p><input id="mwp_wpvivid_setting_export" type="button" name="" value="Export">Export settings of WPvivid Backup for MainWP extension to your local computer.</p>
     1501                                    </td>
     1502                                    <td>
     1503                                        <p><input type="file" name="fileTrans" id="mwp_wpvivid_select_import_file"></p>
     1504                                        <p><input id="mwp_wpvivid_setting_import" type="button" name="" value="Import">Import exported settings of WPvivid Backup for MainWP extension to the current site.</p>
     1505                                    </td>
     1506                                </tr>
     1507                            </table>
    12981508                        </td>
    12991509                    </tr>
     
    23892599                    <div id="mwp_wpvivid_image_custom_backup_path" style="display: none">
    23902600                        <span><code><?php echo esc_html($backup_path_prefix); ?></code></span>
    2391                         <input type="text" option="mwp-setting-addon" name="mwp_image_backup_path_addon" class="all-options" value="<?php echo esc_attr($backup_path); ?>" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" onpaste="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
     2601                        <input type="text" option="mwp-setting-addon" name="mwp_image_backup_path_addon" class="all-options" value="<?php echo esc_attr($backup_path); ?>" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9_]/g,'')" onpaste="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
    23922602                    </div>
    23932603                </td>
     
    29673177        $rollback_max_backup_count=isset($this->setting_addon['wpvivid_common_setting']['rollback_max_backup_count']) ? $this->setting_addon['wpvivid_common_setting']['rollback_max_backup_count'] : 30;
    29683178        $rollback_max_backup_count=intval($rollback_max_backup_count);
     3179        $rollback_max_remote_backup_count=isset($this->setting_addon['wpvivid_common_setting']['rollback_max_remote_backup_count']) ? $this->setting_addon['wpvivid_common_setting']['rollback_max_remote_backup_count'] : 30;
     3180        $rollback_max_remote_backup_count=intval($rollback_max_remote_backup_count);
     3181
     3182        $rollback_remote = isset($this->setting_addon['wpvivid_rollback_remote']) ? $this->setting_addon['wpvivid_rollback_remote'] : 0;
     3183        $rollback_retain_local = isset($this->setting_addon['wpvivid_rollback_retain_local']) ? $this->setting_addon['wpvivid_rollback_retain_local'] : 0;
     3184        if($rollback_retain_local)
     3185        {
     3186            $rollback_retain_local = 'checked';
     3187        }
     3188        else
     3189        {
     3190            $rollback_retain_local = '';
     3191        }
    29693192
    29703193        ?>
     
    29833206            </div>
    29843207            <div style="margin-bottom: 10px;">
     3208
     3209                <p>
     3210                    <select option="mwp-rollback-addon" name="mwp_wpvivid_manual_backup_remote_selector">
     3211                        <?php
     3212                        if($global)
     3213                        {
     3214                            if($rollback_remote)
     3215                            {
     3216                                ?>
     3217                                <option value="-1">Backup to Localhost</option>
     3218                                <option value="1" selected="selected">Backup to Remote</option>
     3219                                <?php
     3220                            }
     3221                            else
     3222                            {
     3223                                ?>
     3224                                <option value="-1" selected="selected">Backup to Localhost</option>
     3225                                <option value="1">Backup to Remote</option>
     3226                                <?php
     3227                            }
     3228                        }
     3229                        else
     3230                        {
     3231                            ?>
     3232                            <option value="-1">Backup to Localhost</option>
     3233                            <?php
     3234                        }
     3235                        ?>
     3236                    </select>
     3237                    <span>Choose cloud storage for versioning backups (files + database).</span>
     3238                </p>
     3239                <p>
     3240                    <label>
     3241                        <input type="checkbox" option="mwp-rollback-addon" name="mwp_wpvivid_rollback_retain_local_addon" <?php echo $rollback_retain_local; ?>> Keep storing the backups in localhost after uploading to remote storage.
     3242                    </label>
     3243                </p>
     3244
    29853245                <p>
    29863246                    <label>
     
    29963256                        </label>
    29973257                    </p>
     3258                    <p>
     3259                        <label>
     3260                            <input type="text" class="mwp-wpvivid-rollback-count-retention" placeholder="30" option="mwp-rollback-addon" name="mwp_wpvivid_rollback_max_remote_backup_count_addon" value="<?php esc_attr_e($rollback_max_remote_backup_count); ?>">
     3261                            <span> database backups retained in remote storage.</span>
     3262                        </label>
     3263                    </p>
    29983264                </div>
    29993265            </div>
     
    30183284                    jQuery('#mwp_wpvivid_auto_backup_db_count_display').hide();
    30193285                }
     3286            });
     3287
     3288            var mwp_wpvivid_get_rollback_remote_retry_times = 0;
     3289            function mwp_wpvivid_get_rollback_remote_retry(error_msg){
     3290                var need_retry_get_rollback_remote = false;
     3291                mwp_wpvivid_get_rollback_remote_retry_times++;
     3292                if(mwp_wpvivid_get_rollback_remote_retry_times < 3){
     3293                    need_retry_get_rollback_remote = true;
     3294                }
     3295                if(need_retry_get_rollback_remote){
     3296                    setTimeout(function(){
     3297                        mwp_wpvivid_init_get_rollback_remote();
     3298                    }, 3000);
     3299                }
     3300                else{
     3301                }
     3302            }
     3303
     3304            function mwp_wpvivid_init_get_rollback_remote()
     3305            {
     3306                var ajax_data = {
     3307                    'action': 'mwp_wpvivid_achieve_rollback_remote_addon',
     3308                    'site_id': '<?php echo esc_html($this->site_id); ?>'
     3309                };
     3310                mwp_wpvivid_post_request(ajax_data, function (data) {
     3311                    try {
     3312                        var jsonarray = jQuery.parseJSON(data);
     3313                        if (jsonarray.result === 'success') {
     3314                            jQuery('select[option=mwp-rollback-addon][name=mwp_wpvivid_manual_backup_remote_selector]').html(jsonarray.remote_list_html);
     3315                        }
     3316                        else {
     3317                            mwp_wpvivid_get_rollback_remote_retry(jsonarray.error);
     3318                        }
     3319                    }
     3320                    catch (err) {
     3321                        mwp_wpvivid_get_rollback_remote_retry(err);
     3322                    }
     3323                }, function (XMLHttpRequest, textStatus, errorThrown) {
     3324                    var error_message = mwp_wpvivid_output_ajaxerror('achieving backup', textStatus, errorThrown);
     3325                    mwp_wpvivid_get_rollback_remote_retry(error_message);
     3326                });
     3327            }
     3328
     3329            jQuery(document).ready(function($)
     3330            {
     3331                mwp_wpvivid_init_get_rollback_remote();
    30203332            });
    30213333        </script>
  • wpvivid-backup-mainwp/trunk/readme.txt

    r3141352 r3182762  
    33Tags: WPvivid backup, MainWP extension, backup, auto backup, cloud backup
    44Requires at least: 4.5
    5 Tested up to: 6.6.1
     5Tested up to: 6.6.2
    66Requires PHP: 5.3
    7 Stable tag: 0.9.37
     7Stable tag: 0.9.38
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    4848
    4949== Changelog ==
     50= 0.9.38 =
     51- Added an option to globally configure backup location for rollback backups.
     52- Added an option to export/import settings of the extension.
     53- Fixed: Redirection to a child site would fail when white label slug of the site contained capital letters.
     54- Fixed: Activating WPvivid license would fail in some cases.
    5055= 0.9.37 =
    5156- Added an option to install staging addon for child sites.
  • wpvivid-backup-mainwp/trunk/wpvivid-backup-mainwp-subpage.php

    r3100853 r3182762  
    8787                        }
    8888                        else{
    89                             $slug = $white_label_setting['white_label_slug'];
     89                            $slug = strtolower($white_label_setting['white_label_slug']);
    9090                            $slug_page = strtolower($white_label_setting['white_label_slug']);
    9191                            if($is_mu)
     
    14221422        return $remote_list_html;
    14231423    }
     1424
     1425    static public function output_rollback_remote_list_addon($site_id, $remote_list)
     1426    {
     1427        $remote_list_html = '';
     1428        $setting_addon=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_option($site_id, 'settings_addon', array());
     1429        $rollback_remote = isset($setting_addon['wpvivid_rollback_remote']) ? $setting_addon['wpvivid_rollback_remote'] : 0;
     1430        $remote_id = isset($setting_addon['wpvivid_rollback_remote_id']) ? $setting_addon['wpvivid_rollback_remote_id'] : 0;
     1431        if($rollback_remote)
     1432        {
     1433            $remote_list_html .= '<option value="-1">Choose cloud storage</option>';
     1434        }
     1435        else
     1436        {
     1437            $remote_list_html .= '<option value="-1" selected="selected" >Choose cloud storage</option>';
     1438        }
     1439
     1440        foreach ($remote_list as $key => $value)
     1441        {
     1442            if($key === 'remote_selected')
     1443            {
     1444                continue;
     1445            }
     1446
     1447            if(!isset($remote_option['id']))
     1448            {
     1449                $remote_option['id'] = $key;
     1450            }
     1451
     1452            if($remote_id==$key&&$rollback_remote)
     1453            {
     1454                $remote_list_html .= '<option value="'.$value['id'].'" selected="selected">'.$value['name'].'</option>';
     1455            }
     1456            else
     1457            {
     1458                $remote_list_html .= '<option value="'.$value['id'].'">'.$value['name'].'</option>';
     1459            }
     1460        }
     1461        return $remote_list_html;
     1462    }
    14241463}
  • wpvivid-backup-mainwp/trunk/wpvivid-backup-mainwp.php

    r3141352 r3182762  
    55 * Plugin URI: https://mainwp.com/
    66 * Description: WPvivid Backup for MainWP enables you to create and download backups of a specific child site, set backup schedules, connect with your remote storage and set settings for all of your child sites directly from your MainWP dashboard.
    7  * Version: 0.9.37
     7 * Version: 0.9.38
    88 * Author: WPvivid Team
    99 * Author URI: https://wpvivid.com
     
    2424    protected $plugin_handle = 'wpvivid-backup-mainwp';
    2525    protected $product_id = 'WPvivid Backup MainWP';
    26     protected $version = '0.9.37';
     26    protected $version = '0.9.38';
    2727    protected $childEnabled;
    2828    public $childKey;
     
    806806    {
    807807        $login_addon=Mainwp_WPvivid_Extension_DB_Option::get_instance()->wpvivid_get_global_option('login_addon', array());
     808        if ( !is_array($login_addon) || empty($login_addon) ) {
     809            $login_addon = array();
     810        }
    808811        return $login_addon;
    809812    }
     
    19231926                    $wpvivid_need_update = false;
    19241927
    1925                     $wpvivid_status = false;
     1928                    /*$wpvivid_status = false;
    19261929                    foreach ($plugins as $plugin){
    19271930                        $reg_string = 'wpvivid-backuprestore/wpvivid-backuprestore.php';
     
    19511954                            break;
    19521955                        }
    1953                     }
    1954 
    1955                     if($wpvivid_status){
     1956                    }*/
     1957
     1958                    //if($wpvivid_status)
     1959                    //{
    19561960                        $site['status'] = 'WPvivid Backup Pro not claimed';
    19571961                        $site['class'] = 'need-install-wpvivid-pro';
     
    20372041                            }
    20382042                        }
    2039                     }
     2043                    //}
    20402044                    if (isset($_GET['search']) && !empty($_GET['search'])) {
    20412045                        $find = trim(sanitize_text_field($_GET['search']));
Note: See TracChangeset for help on using the changeset viewer.