Plugin Directory

Changeset 893454


Ignore:
Timestamp:
04/15/2014 08:24:26 AM (12 years ago)
Author:
michitzky
Message:

tagging version 0.7

Location:
mk-simple-backups
Files:
1 added
3 edited
3 copied

Legend:

Unmodified
Added
Removed
  • mk-simple-backups/tags/0.7/mk-simple-backups.php

    r893007 r893454  
    55 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/
    66 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu.
    7  * Version: 0.6.2
     7 * Version: 0.7
    88 * Author: Michael Kühni
    99 * Author URI: http://michaelkuehni.ch
     
    1414// backend only
    1515if(is_admin()) {
    16    
    1716   
    1817   
     
    5251    add_action( 'init', 'mk_simple_backups_load_textdomain' );
    5352   
    54    
     53    // set option
     54    update_option( $settings_var_name, $settings );
    5555
    5656
     
    6262        global $wpdb;
    6363   
    64    
     64       
     65       
     66       
    6567        $msg = array();
    6668        $this_plugin_data = get_plugin_data( __FILE__);
     
    99101                    $bkp_single_files_with_path = array();
    100102                    $bkp_single_files = array();
     103                    $new_settings = array( "db"=>false, "theme"=>false, "upload"=>false, "upload_type"=>"db" );
    101104
    102105                   
     
    108111                                    $s = $bkp->createDBBackup();
    109112                                    $desc = __("Database", "mk-simple-backups");
     113                                    $new_settings["db"] = true;
    110114                                    break;
    111115                                case "theme":
    112116                                    $s = $bkp->createThemeBackup();
    113117                                    $desc = __("Theme", "mk-simple-backups");
     118                                    $new_settings["theme"] = true;
    114119                                    break;
    115120                                case "uploads":
     121                                    $new_settings["upload"] = true;
    116122                                    if($_POST["upload_options"] == "file") {
    117123                                        $s = $bkp->createUploadBackup();
    118124                                        $desc = __("Uploads (file based)", "mk-simple-backups");
     125                                        $new_settings["upload_type"] = "file";
    119126                                    }
    120127                                    else {
    121128                                        $s = $bkp->createUploadBackupByDB();
    122129                                        $desc = __("Uploads (db based)", "mk-simple-backups");
     130                                        $new_settings["upload_type"] = "db";
    123131                                    }
    124132                                    break;
     
    155163                    break;
    156164            }
     165           
     166            // save settings
     167            $settings_var_name = "mk-simple-backups-settings";
     168            if(isset($new_settings)) update_option( $settings_var_name, serialize($new_settings));
     169           
     170            // get settings
     171            $settings_s =  get_option($settings_var_name);
     172            if($settings_s == false) {
     173                // default settings
     174                $settings = array( "db" => true, "upload" => true, "theme" => true, "upload_type" => "db");
     175            } else $settings = unserialize($settings_s);
     176           
     177           
    157178       
    158179            // echo msg's
     
    238259                <form action="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&amp;action=createBackup" method="post">
    239260                    <ul class="options">
    240                         <li class="theme"><label><input type="checkbox" name="options[]" value="theme" checked="checked"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li>
    241                         <li class="db"><label><input type="checkbox" name="options[]" value="db" checked="checked"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li>
    242                         <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" checked="checked"><strong>/uploads</strong>, Uploads</label>
     261                        <li class="theme"><label><input type="checkbox" name="options[]" value="theme" <? if($settings["theme"] == true) echo 'checked="checked"'; ?>><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li>
     262                        <li class="db"><label><input type="checkbox" name="options[]" value="db" <? if($settings["db"] == true) echo 'checked="checked"'; ?>><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li>
     263                        <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" <? if($settings["upload"] == true) echo 'checked="checked"'; ?>><strong>/uploads</strong>, Uploads</label>
    243264                            <select name="upload_options">
    244                                 <option value="file"><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option>
    245                                 <option value="db" selected="selected"><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option>
     265                                <option value="file" <? if($settings["upload_type"] == "file") echo 'selected="selected"'; ?>><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option>
     266                                <option value="db" <? if($settings["upload_type"] == "db") echo 'selected="selected"'; ?>><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option>
    246267                            </select></li>
    247268                       
     
    296317    global $bkp;
    297318   
     319    // delete option
     320    delete_option("mk-simple-backups-settings");
     321   
    298322    // attempt to flush backup directory
    299323    $bkp->flushBackupDir();
  • mk-simple-backups/tags/0.7/readme.txt

    r893007 r893454  
    33Tags: backup, db, uploads
    44Requires at least: 3.8
    5 Stable tag: 0.6.2
     5Stable tag: 0.7
    66Tested up to: 3.9RC1
    77License: GPLv2 or later
     
    2020Backups will be stored within a folder in wp-content and be downloadable from the Backend. Once the downloads are finished, the backup files on the Server can be flushed.
    2121
    22 Plugin Author does not take any responsibility for the safety of your data or the integrity of the generated backups.
     22What's good:
     23* Simple: Choose what is included in your Backup and download the resulting ZIP Archive from your Backend
     24* Unotrusive: Nested within the "Tools" Submenu and comes without any bling bling, following WP Backend Styles
     25* Lightweight: 28KB zipped, 72KB unzipped
     26
     27The plugin author does not take any responsibility for the safety of your data or the integrity of the generated backups.
    2328
    2429== Installation ==
     
    4045It is not advised for two reasons: first) when your Hosting/Server breaks, a server-side backup might go down with it and second) the sql-dump contains usernames for your wordpress installation, it MUST NOT be permanently stored on the server
    4146
     47= Should I not backup the Plugins? =
     48Plugins are a vital part of many Wordpress Installations, which makes them prime candidates for a backup. However, there are a couple of reasons not to include them: a) They outdate quickly, making a backed up Version easily obsolete, b) Plugins can get quite large and in quantity would slow down Backups considerably, c) They must not include custom code and therefore can easily be re-downloaded in current or older Versions from the repository. If a plugin uses and stores custom data, chances are, that this data sits within the DB, which will be included in the SQL Dump.
     49
     50= Why is there no way to schedule Backups? =
     51This Plugin was designed around the idea of having a simple tool to create small Backups before updating Wordpress. Scheduled and automatic Backups are currently not about to be added. If you're looking for something like that, I would suggest UpdraftPlus or BackWPup.
     52
     53= Why is the Version Number only 0.x =
     54It's only a number. Minor updates and Bugfixes will increase the 0.0.x counter, where bigger updates will increase 0.x
     55
    4256== Screenshots ==
    4357
     
    4559
    4660== Changelog ==
     61
     62= 0.7 =
     63* Plugin now saves the form-state when creating a Backup
     64* Plugin option will be removed when deactivating the Plugin
     65* Added Plugin Repository Banner (Armadillo!)
     66* Updated Screenshot
     67* Updated Read-me
    4768
    4869= 0.6.2 =
  • mk-simple-backups/trunk/mk-simple-backups.php

    r893007 r893454  
    55 * Plugin URI: http://wordpress.org/plugins/mk-simple-backups/
    66 * Description: Allows you to create simple backups on a dedicated page nested in the "Tools" Menu.
    7  * Version: 0.6.2
     7 * Version: 0.7
    88 * Author: Michael Kühni
    99 * Author URI: http://michaelkuehni.ch
     
    1414// backend only
    1515if(is_admin()) {
    16    
    1716   
    1817   
     
    5251    add_action( 'init', 'mk_simple_backups_load_textdomain' );
    5352   
    54    
     53    // set option
     54    update_option( $settings_var_name, $settings );
    5555
    5656
     
    6262        global $wpdb;
    6363   
    64    
     64       
     65       
     66       
    6567        $msg = array();
    6668        $this_plugin_data = get_plugin_data( __FILE__);
     
    99101                    $bkp_single_files_with_path = array();
    100102                    $bkp_single_files = array();
     103                    $new_settings = array( "db"=>false, "theme"=>false, "upload"=>false, "upload_type"=>"db" );
    101104
    102105                   
     
    108111                                    $s = $bkp->createDBBackup();
    109112                                    $desc = __("Database", "mk-simple-backups");
     113                                    $new_settings["db"] = true;
    110114                                    break;
    111115                                case "theme":
    112116                                    $s = $bkp->createThemeBackup();
    113117                                    $desc = __("Theme", "mk-simple-backups");
     118                                    $new_settings["theme"] = true;
    114119                                    break;
    115120                                case "uploads":
     121                                    $new_settings["upload"] = true;
    116122                                    if($_POST["upload_options"] == "file") {
    117123                                        $s = $bkp->createUploadBackup();
    118124                                        $desc = __("Uploads (file based)", "mk-simple-backups");
     125                                        $new_settings["upload_type"] = "file";
    119126                                    }
    120127                                    else {
    121128                                        $s = $bkp->createUploadBackupByDB();
    122129                                        $desc = __("Uploads (db based)", "mk-simple-backups");
     130                                        $new_settings["upload_type"] = "db";
    123131                                    }
    124132                                    break;
     
    155163                    break;
    156164            }
     165           
     166            // save settings
     167            $settings_var_name = "mk-simple-backups-settings";
     168            if(isset($new_settings)) update_option( $settings_var_name, serialize($new_settings));
     169           
     170            // get settings
     171            $settings_s =  get_option($settings_var_name);
     172            if($settings_s == false) {
     173                // default settings
     174                $settings = array( "db" => true, "upload" => true, "theme" => true, "upload_type" => "db");
     175            } else $settings = unserialize($settings_s);
     176           
     177           
    157178       
    158179            // echo msg's
     
    238259                <form action="<? bloginfo("siteurl"); ?>/wp-admin/tools.php?page=mk-simple-backups&amp;action=createBackup" method="post">
    239260                    <ul class="options">
    240                         <li class="theme"><label><input type="checkbox" name="options[]" value="theme" checked="checked"><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li>
    241                         <li class="db"><label><input type="checkbox" name="options[]" value="db" checked="checked"><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li>
    242                         <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" checked="checked"><strong>/uploads</strong>, Uploads</label>
     261                        <li class="theme"><label><input type="checkbox" name="options[]" value="theme" <? if($settings["theme"] == true) echo 'checked="checked"'; ?>><strong><?=wp_get_theme();?></strong>, <? _e('Active Theme', 'mk-simple-backups'); ?></label></li>
     262                        <li class="db"><label><input type="checkbox" name="options[]" value="db" <? if($settings["db"] == true) echo 'checked="checked"'; ?>><strong><? _e('SQL-Dump', 'mk-simple-backups'); ?></strong>, <? _e('Database', 'mk-simple-backups'); ?></label></li>
     263                        <li class="uploads"><label><input type="checkbox" name="options[]" value="uploads" <? if($settings["upload"] == true) echo 'checked="checked"'; ?>><strong>/uploads</strong>, Uploads</label>
    243264                            <select name="upload_options">
    244                                 <option value="file"><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option>
    245                                 <option value="db" selected="selected"><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option>
     265                                <option value="file" <? if($settings["upload_type"] == "file") echo 'selected="selected"'; ?>><? printf( __('All files within %s', 'mk-simple-backups'), $bkp->upload_dir["baseurl"]); ?></option>
     266                                <option value="db" <? if($settings["upload_type"] == "db") echo 'selected="selected"'; ?>><? _e('Attachments from DB (post_type: attachment)', 'mk-simple-backups'); ?></option>
    246267                            </select></li>
    247268                       
     
    296317    global $bkp;
    297318   
     319    // delete option
     320    delete_option("mk-simple-backups-settings");
     321   
    298322    // attempt to flush backup directory
    299323    $bkp->flushBackupDir();
  • mk-simple-backups/trunk/readme.txt

    r893007 r893454  
    33Tags: backup, db, uploads
    44Requires at least: 3.8
    5 Stable tag: 0.6.2
     5Stable tag: 0.7
    66Tested up to: 3.9RC1
    77License: GPLv2 or later
     
    2020Backups will be stored within a folder in wp-content and be downloadable from the Backend. Once the downloads are finished, the backup files on the Server can be flushed.
    2121
    22 Plugin Author does not take any responsibility for the safety of your data or the integrity of the generated backups.
     22What's good:
     23* Simple: Choose what is included in your Backup and download the resulting ZIP Archive from your Backend
     24* Unotrusive: Nested within the "Tools" Submenu and comes without any bling bling, following WP Backend Styles
     25* Lightweight: 28KB zipped, 72KB unzipped
     26
     27The plugin author does not take any responsibility for the safety of your data or the integrity of the generated backups.
    2328
    2429== Installation ==
     
    4045It is not advised for two reasons: first) when your Hosting/Server breaks, a server-side backup might go down with it and second) the sql-dump contains usernames for your wordpress installation, it MUST NOT be permanently stored on the server
    4146
     47= Should I not backup the Plugins? =
     48Plugins are a vital part of many Wordpress Installations, which makes them prime candidates for a backup. However, there are a couple of reasons not to include them: a) They outdate quickly, making a backed up Version easily obsolete, b) Plugins can get quite large and in quantity would slow down Backups considerably, c) They must not include custom code and therefore can easily be re-downloaded in current or older Versions from the repository. If a plugin uses and stores custom data, chances are, that this data sits within the DB, which will be included in the SQL Dump.
     49
     50= Why is there no way to schedule Backups? =
     51This Plugin was designed around the idea of having a simple tool to create small Backups before updating Wordpress. Scheduled and automatic Backups are currently not about to be added. If you're looking for something like that, I would suggest UpdraftPlus or BackWPup.
     52
     53= Why is the Version Number only 0.x =
     54It's only a number. Minor updates and Bugfixes will increase the 0.0.x counter, where bigger updates will increase 0.x
     55
    4256== Screenshots ==
    4357
     
    4559
    4660== Changelog ==
     61
     62= 0.7 =
     63* Plugin now saves the form-state when creating a Backup
     64* Plugin option will be removed when deactivating the Plugin
     65* Added Plugin Repository Banner (Armadillo!)
     66* Updated Screenshot
     67* Updated Read-me
    4768
    4869= 0.6.2 =
Note: See TracChangeset for help on using the changeset viewer.