Version Description
- Fixes backwards compatibility for add-ons and avoids a Fatal Error. Please upgrade straight to this version before upgrading your add-ons.
Download this release
Release Info
| Developer | pauldewouters |
| Plugin | |
| Version | 3.1.3 |
| Comparing to | |
| See all releases | |
Code changes from version 3.1.2 to 3.1.3
- backupwordpress.php +4 -2
- classes/class-backupwordpress-wp-cli-command.php +1 -1
- classes/deprecated.php +92 -0
- readme.txt +9 -1
backupwordpress.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: BackUpWordPress
|
| 4 |
Plugin URI: http://bwp.hmn.md/
|
| 5 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>. On multisite, you'll find me under the Network Settings menu.
|
| 6 |
-
Version: 3.1.
|
| 7 |
Author: Human Made Limited
|
| 8 |
Author URI: http://hmn.md/
|
| 9 |
License: GPL-2.0+
|
|
@@ -43,7 +43,7 @@ register_deactivation_hook( __FILE__, array( 'HM\BackUpWordPress\Setup', 'deacti
|
|
| 43 |
*/
|
| 44 |
final class Plugin {
|
| 45 |
|
| 46 |
-
const PLUGIN_VERSION = '3.1.
|
| 47 |
|
| 48 |
/**
|
| 49 |
* @var Plugin The singleton instance.
|
|
@@ -180,6 +180,8 @@ final class Plugin {
|
|
| 180 |
require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhook-service.php' );
|
| 181 |
require_once( HMBKP_PLUGIN_PATH . 'classes/class-wpremote-webhook-service.php' );
|
| 182 |
|
|
|
|
|
|
|
| 183 |
// Load the wp cli command
|
| 184 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
| 185 |
include( HMBKP_PLUGIN_PATH . 'classes/class-backupwordpress-wp-cli-command.php' );
|
| 3 |
Plugin Name: BackUpWordPress
|
| 4 |
Plugin URI: http://bwp.hmn.md/
|
| 5 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>. On multisite, you'll find me under the Network Settings menu.
|
| 6 |
+
Version: 3.1.3
|
| 7 |
Author: Human Made Limited
|
| 8 |
Author URI: http://hmn.md/
|
| 9 |
License: GPL-2.0+
|
| 43 |
*/
|
| 44 |
final class Plugin {
|
| 45 |
|
| 46 |
+
const PLUGIN_VERSION = '3.1.3';
|
| 47 |
|
| 48 |
/**
|
| 49 |
* @var Plugin The singleton instance.
|
| 180 |
require_once( HMBKP_PLUGIN_PATH . 'classes/class-webhook-service.php' );
|
| 181 |
require_once( HMBKP_PLUGIN_PATH . 'classes/class-wpremote-webhook-service.php' );
|
| 182 |
|
| 183 |
+
require_once( HMBKP_PLUGIN_PATH . 'classes/deprecated.php' );
|
| 184 |
+
|
| 185 |
// Load the wp cli command
|
| 186 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
| 187 |
include( HMBKP_PLUGIN_PATH . 'classes/class-backupwordpress-wp-cli-command.php' );
|
classes/class-backupwordpress-wp-cli-command.php
CHANGED
|
@@ -112,4 +112,4 @@ class BackUpWordPress_WP_CLI_Command extends WP_CLI_Command {
|
|
| 112 |
|
| 113 |
}
|
| 114 |
|
| 115 |
-
WP_CLI::add_command( 'backupwordpress', '
|
| 112 |
|
| 113 |
}
|
| 114 |
|
| 115 |
+
WP_CLI::add_command( 'backupwordpress', 'BackUpWordPress_WP_CLI_Command' );
|
classes/deprecated.php
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
/**
|
| 5 |
+
* An abstract service class, individual services should
|
| 6 |
+
* extend this class
|
| 7 |
+
*/
|
| 8 |
+
abstract class HMBKP_Service {}
|
| 9 |
+
|
| 10 |
+
/**
|
| 11 |
+
* A singleton to handle the registering, de-registering
|
| 12 |
+
* and storage of services
|
| 13 |
+
*/
|
| 14 |
+
class HMBKP_Services {
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* Store the current instance
|
| 18 |
+
*
|
| 19 |
+
* @access private
|
| 20 |
+
* @var object HMBKP_Services
|
| 21 |
+
* @static
|
| 22 |
+
*/
|
| 23 |
+
private static $instance;
|
| 24 |
+
|
| 25 |
+
/**
|
| 26 |
+
* The array of services
|
| 27 |
+
*
|
| 28 |
+
* Should be of the format array( __FILE__ => __CLASS__ );
|
| 29 |
+
*
|
| 30 |
+
* @access private
|
| 31 |
+
* @var array
|
| 32 |
+
* @static
|
| 33 |
+
*/
|
| 34 |
+
private $services = array();
|
| 35 |
+
|
| 36 |
+
/**
|
| 37 |
+
* The current schedule object
|
| 38 |
+
*
|
| 39 |
+
* @access private
|
| 40 |
+
* @var object HMBKP_Scheduled_Backup
|
| 41 |
+
*/
|
| 42 |
+
private $schedule;
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* Get the current instance
|
| 46 |
+
*
|
| 47 |
+
* @access public
|
| 48 |
+
* @static
|
| 49 |
+
*/
|
| 50 |
+
public static function instance() {
|
| 51 |
+
|
| 52 |
+
if ( ! isset( self::$instance ) )
|
| 53 |
+
self::$instance = new HMBKP_Services;
|
| 54 |
+
|
| 55 |
+
return self::$instance;
|
| 56 |
+
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/**
|
| 60 |
+
* Register a new service
|
| 61 |
+
*
|
| 62 |
+
* @param $filepath
|
| 63 |
+
* @param $classname
|
| 64 |
+
* @return bool|WP_Error
|
| 65 |
+
*/
|
| 66 |
+
public static function register( $filepath, $classname ) {
|
| 67 |
+
|
| 68 |
+
_deprecated_function( __METHOD__, '3.1.2' );
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/**
|
| 72 |
+
* Instantiate the individual service classes
|
| 73 |
+
*
|
| 74 |
+
* @param string $classname
|
| 75 |
+
*
|
| 76 |
+
* @return array An array of instantiated classes
|
| 77 |
+
*/
|
| 78 |
+
private static function instantiate( $classname ) {
|
| 79 |
+
|
| 80 |
+
if ( ! class_exists( $classname ) )
|
| 81 |
+
return new WP_Error( 'hmbkp_invalid_type_error', sprintf( __( 'Argument 1 for %s must be a valid class', 'backupwordpress' ) ), __METHOD__ );
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* @var HMBKP_Service
|
| 85 |
+
*/
|
| 86 |
+
$class = new $classname( self::instance()->schedule );
|
| 87 |
+
|
| 88 |
+
return $class;
|
| 89 |
+
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
}
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: humanmade, willmot, pauldewouters, joehoyle, mattheu, tcrsavage, c
|
|
| 3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 4.2-alpha
|
| 6 |
-
Stable tag: 3.1.
|
| 7 |
|
| 8 |
Simple automated backups of your WordPress powered website.
|
| 9 |
|
|
@@ -118,6 +118,10 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
|
|
| 118 |
|
| 119 |
== Upgrade Notice ==
|
| 120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
= 3.0.4 =
|
| 122 |
|
| 123 |
* Fixes a few minor bugs. Immediate update is recommended.
|
|
@@ -132,6 +136,10 @@ You can also tweet <a href="http://twitter.com/humanmadeltd">@humanmadeltd</a> o
|
|
| 132 |
|
| 133 |
== Changelog ==
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
### 3.1.2 / 2015-02-03
|
| 136 |
|
| 137 |
* (simplify-bwp-file-timestamp) Simplify the file name timestamp
|
| 3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, humanmade
|
| 4 |
Requires at least: 3.9
|
| 5 |
Tested up to: 4.2-alpha
|
| 6 |
+
Stable tag: 3.1.3
|
| 7 |
|
| 8 |
Simple automated backups of your WordPress powered website.
|
| 9 |
|
| 118 |
|
| 119 |
== Upgrade Notice ==
|
| 120 |
|
| 121 |
+
= 3.1.3 =
|
| 122 |
+
|
| 123 |
+
* Fixes backwards compatibility for add-ons and avoids a Fatal Error. Please upgrade straight to this version before upgrading your add-ons.
|
| 124 |
+
|
| 125 |
= 3.0.4 =
|
| 126 |
|
| 127 |
* Fixes a few minor bugs. Immediate update is recommended.
|
| 136 |
|
| 137 |
== Changelog ==
|
| 138 |
|
| 139 |
+
### 3.1.3 / 2015-02-06
|
| 140 |
+
|
| 141 |
+
* Introduces a deprecated.php file to contain any deprecated classes / functions for backwards compat and avoid fatal errors.
|
| 142 |
+
|
| 143 |
### 3.1.2 / 2015-02-03
|
| 144 |
|
| 145 |
* (simplify-bwp-file-timestamp) Simplify the file name timestamp
|
