Plugin Directory

Changeset 3064316


Ignore:
Timestamp:
04/04/2024 05:56:22 AM (2 years ago)
Author:
autobackup
Message:

Initial commit

Location:
autobackup
Files:
4360 added
7 edited

Legend:

Unmodified
Added
Removed
  • autobackup/trunk/admin/autobackup-class-admin.php

    r3029819 r3064316  
    141141        add_submenu_page(
    142142            'pb-dashboard',
     143            esc_html__('Schedule List','autobackup'),
     144            esc_html__('Schedule List','autobackup'),
     145            'manage_options',
     146            'pb-schedulelist',
     147            array($this, 'auto_backup_schedule_list'),
     148        );
     149       
     150        add_submenu_page(
     151            'pb-dashboard',
    143152            esc_html__('Import','autobackup'),
    144153            esc_html__('Import','autobackup'),
     
    180189    }
    181190   
     191    /**
     192     * Plugin Schedule list
     193     */
     194    public function auto_backup_schedule_list(){
     195        require_once AUTO_BACKUP_PATH . '/admin/partials/schedule_list.php';
     196    }
    182197    /**
    183198     * Plugin Schedule
     
    12751290        die();
    12761291    }
     1292   
     1293    public function auto_backup_delete_schedule() {
     1294        if (isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'autobackup_ajax_nonce')) {
     1295            if($_POST['action'] != 'auto_backup_delete_schedule'){
     1296                echo wp_send_json_error(array('message' => esc_html__('Access is denied!', 'autobackup')));
     1297                wp_die();
     1298            }
     1299            if(!empty($_POST['hook'])){
     1300                $hook = $_POST['hook'];
     1301                $data = wp_unschedule_event(wp_next_scheduled($hook), $hook);
     1302                //$data = '1';
     1303                if(!empty($data)){
     1304                    echo wp_send_json_success(array('message' => esc_html__('Schedule removed successfully.', 'autobackup')));
     1305                }
     1306            }else{
     1307                echo wp_send_json_error(array('message' => esc_html__('Invalid Schedule.', 'autobackup')));
     1308            }
     1309        }else{
     1310            echo wp_send_json_error(array('message' => esc_html__('Invalid nonce.', 'autobackup')));
     1311        }
     1312       
     1313        die();
     1314    }
    12771315}
  • autobackup/trunk/admin/css/autobackup-admin.css

    r3029819 r3064316  
    162162
    163163.pb-page-content.pb-schedule-page .bckup-card {
    164     max-width: 540px;
     164    max-width: 1800px;
    165165}
    166166/*===== Switch =====*/
     
    968968    color: var(--autobackup-global-color);
    969969}
     970.pb-schedule {
     971    background: #f8e0cd;
     972    border: 1px solid #f89540;
     973    padding: 4px 20px;
     974    display: inline-block;
     975    border-radius: 30px;
     976    font-weight: 500;
     977    color: #f89540;
     978}
     979
    970980/* Responsive */
    971981
  • autobackup/trunk/admin/js/autobackup-admin.js

    r3029819 r3064316  
    593593        });
    594594       
     595        /** Delete cron schedule **/
     596       
     597        $('.autobk-delete-schedule').on('click', function (e) {
     598            e.preventDefault();
     599            var hook = $(this).attr('hook');
     600            $.ajax({
     601                url: ajax_object.url,
     602                type: 'post',   
     603                data:  {
     604                    'action': 'auto_backup_delete_schedule',
     605                    'nonce' : ajax_object.nonce,
     606                    'hook': hook,
     607                },
     608                success: function(response) {
     609                    console.log(response.data.message);
     610                    if (response.success) {
     611                        pb_alert_message(response.data.message, 'success');
     612                        setTimeout( function () {
     613                            window.location.href = '';
     614                        },3000 );
     615                    }else{
     616                        pb_alert_message(response.data.message, 'error');
     617                    }
     618                }
     619            });
     620        });
     621       
    595622        /** Alert Function **/
    596623        function pb_alert_message( msg, msg_status ){
     
    607634        }
    608635    });
     636   
    609637
    610638})(jQuery);
  • autobackup/trunk/admin/partials/import.php

    r3029819 r3064316  
    11<?php
    22if ( ! defined( 'ABSPATH' ) ){ exit; }
     3$post_max_size ='';
    34$post_max_size = ini_get('post_max_size');
    45?>
     
    1819                                <label for=""><?php echo esc_html__('Select file to Import', 'autobackup'); ?></label>
    1920                                <input id="pb-import-file" type="file" name="import_file" />
    20                                 <p><?php echo printf(esc_html__('Choose a file from your computer: (Maximum size: %s)', 'autobackup'),esc_html($post_max_size)); ?></p>
     21                                <p><?php printf(esc_html__('Choose a file from your computer: (Maximum size: %s)', 'autobackup'),esc_html($post_max_size)); ?></p>
    2122                            </div>
    2223                            <div class="pb-notice">
  • autobackup/trunk/autobackup.php

    r3029926 r3064316  
    1717 * Plugin URI:        https://www.autobackup.io
    1818 * Description:       WordPress plugin for backup and restoration with cloud storage like NeevCloud, Google Drive, DropBox, AWS S3, FTP etc.
    19  * Version:           1.0.1
     19 * Version:           1.0.2
    2020 * Author:            Autobackup
    2121 * Author URI:        https://www.autobackup.io
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'AUTO_BACKUP_VERSION', '1.0.1' );
     38define( 'AUTO_BACKUP_VERSION', '1.0.2' );
    3939define( 'AUTO_BACKUP_PATH', WP_PLUGIN_DIR . '/autobackup' );
    4040define( 'AUTO_BACKUP_URL', WP_PLUGIN_URL . '/autobackup' );
  • autobackup/trunk/includes/autobackup-class.php

    r3029817 r3064316  
    189189        $this->loader->add_action( 'wp_ajax_auto_backup_import_data', $plugin_admin, 'auto_backup_import_data' );
    190190       
     191        $this->loader->add_action( 'wp_ajax_auto_backup_delete_schedule', $plugin_admin, 'auto_backup_delete_schedule' );
     192       
    191193        $this->loader->add_action('admin_footer', $plugin_admin, 'auto_backup_admin_footer');
    192194       
  • autobackup/trunk/readme.txt

    r3030012 r3064316  
    33Tags: Backup, AutoBackup, Sheduled Backup, Cloud Backup, Restore, WordPress Backup
    44Requires at least: 5.0
    5 Tested up to: 6.4.3
     5Tested up to: 6.5.0
    66Requires PHP: 7.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575* Provide multiple remote storage locations
    7676* Provide flexibility to schedule backups
     77* Display active scheduled tasks list
     78* Option to remove schedules
    7779* Easy to use
    7880
     
    111113
    112114== Changelog ==
     115= 1.0.2 =
     116* Add display active scheduled tasks list
     117* Add option to remove schedules
     118
    113119= 1.0.1 =
    114120* PHP version dependency issue fixed in AWS composer.
Note: See TracChangeset for help on using the changeset viewer.