diff --git a/assets/images/backwpupbanner-free.png b/assets/images/backwpupbanner-free.png deleted file mode 100644 index 3d759cc9..00000000 Binary files a/assets/images/backwpupbanner-free.png and /dev/null differ diff --git a/assets/images/backwpupbanner-pro.png b/assets/images/backwpupbanner-pro.png deleted file mode 100644 index 90f7426a..00000000 Binary files a/assets/images/backwpupbanner-pro.png and /dev/null differ diff --git a/assets/images/backwpupbanner.png b/assets/images/backwpupbanner.png new file mode 100644 index 00000000..b80ca2a4 Binary files /dev/null and b/assets/images/backwpupbanner.png differ diff --git a/assets/images/banner-de.jpg b/assets/images/banner-de.jpg new file mode 100644 index 00000000..b1678848 Binary files /dev/null and b/assets/images/banner-de.jpg differ diff --git a/assets/images/banner-en.jpg b/assets/images/banner-en.jpg new file mode 100644 index 00000000..22dd4fb2 Binary files /dev/null and b/assets/images/banner-en.jpg differ diff --git a/assets/images/banner-survey-de.png b/assets/images/banner-survey-de.png new file mode 100644 index 00000000..6c9876e7 Binary files /dev/null and b/assets/images/banner-survey-de.png differ diff --git a/assets/images/banner-survey-en.png b/assets/images/banner-survey-en.png new file mode 100644 index 00000000..3f7d1b3b Binary files /dev/null and b/assets/images/banner-survey-en.png differ diff --git a/assets/images/erroreven.png b/assets/images/erroreven.png index 009d4893..daf865b3 100644 Binary files a/assets/images/erroreven.png and b/assets/images/erroreven.png differ diff --git a/assets/images/hgbtgreen.png b/assets/images/hgbtgreen.png index 7424533c..43b22eb6 100644 Binary files a/assets/images/hgbtgreen.png and b/assets/images/hgbtgreen.png differ diff --git a/assets/images/hgbtred.png b/assets/images/hgbtred.png index eedaef76..160826b8 100644 Binary files a/assets/images/hgbtred.png and b/assets/images/hgbtred.png differ diff --git a/assets/images/hgtopgreen.png b/assets/images/hgtopgreen.png index 7a19090c..de555a6e 100644 Binary files a/assets/images/hgtopgreen.png and b/assets/images/hgtopgreen.png differ diff --git a/assets/images/imagecloud.png b/assets/images/imagecloud.png index 0d6cb9d2..9ccd363f 100644 Binary files a/assets/images/imagecloud.png and b/assets/images/imagecloud.png differ diff --git a/assets/images/imagedata.png b/assets/images/imagedata.png index 2aff3485..d05c12a7 100644 Binary files a/assets/images/imagedata.png and b/assets/images/imagedata.png differ diff --git a/assets/images/imagerepair.png b/assets/images/imagerepair.png deleted file mode 100644 index 834af97f..00000000 Binary files a/assets/images/imagerepair.png and /dev/null differ diff --git a/assets/images/imagesave.png b/assets/images/imagesave.png index 27a57da1..7a6626a9 100644 Binary files a/assets/images/imagesave.png and b/assets/images/imagesave.png differ diff --git a/assets/images/imagesec.png b/assets/images/imagesec.png index de5ba40e..9ef6cd6f 100644 Binary files a/assets/images/imagesec.png and b/assets/images/imagesec.png differ diff --git a/assets/images/imagexml.png b/assets/images/imagexml.png index dbdb9bf4..113fcd60 100644 Binary files a/assets/images/imagexml.png and b/assets/images/imagexml.png differ diff --git a/assets/images/odd.png b/assets/images/odd.png index b21c225f..b277a89a 100644 Binary files a/assets/images/odd.png and b/assets/images/odd.png differ diff --git a/assets/images/tickeven.png b/assets/images/tickeven.png index 49137b7d..9e139a3e 100644 Binary files a/assets/images/tickeven.png and b/assets/images/tickeven.png differ diff --git a/backwpup.php b/backwpup.php index f96fac69..ad37bb83 100644 --- a/backwpup.php +++ b/backwpup.php @@ -5,7 +5,7 @@ * Description: WordPress Backup Plugin * Author: Inpsyde GmbH * Author URI: http://inpsyde.com - * Version: 3.3.1 + * Version: 3.3.2 * Text Domain: backwpup * Domain Path: /languages/ * Network: true @@ -33,7 +33,7 @@ if ( ! class_exists( 'BackWPup' ) ) { - // Don't activate on anything less than PHP 5.2.7 or WordPress 3.1 + // Don't activate on anything less than PHP 5.2.7 or WordPress 3.8 if ( version_compare( PHP_VERSION, '5.2.7', '<' ) || version_compare( get_bloginfo( 'version' ), '3.8', '<' ) || ! function_exists( 'spl_autoload_register' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; deactivate_plugins( __FILE__ ); @@ -70,13 +70,9 @@ private function __construct() { //auto loader spl_autoload_register( array( $this, 'autoloader' ) ); //start upgrade if needed - if ( get_site_option( 'backwpup_version' ) != self::get_plugin_data( 'Version' ) ) { + if ( get_site_option( 'backwpup_version' ) !== self::get_plugin_data( 'Version' ) || ! wp_next_scheduled( 'backwpup_check_cleanup' ) ) { BackWPup_Install::activate(); } - //load pro features - if ( class_exists( 'BackWPup_Pro' ) ) { - BackWPup_Pro::get_instance(); - } //WP-Cron if ( defined( 'DOING_CRON' ) && DOING_CRON ) { if ( ! empty( $_GET[ 'backwpup_run' ] ) && class_exists( 'BackWPup_Job' ) ) { @@ -95,7 +91,7 @@ private function __construct() { //deactivation hook register_deactivation_hook( __FILE__, array( 'BackWPup_Install', 'deactivate' ) ); //Admin bar - if ( get_site_option( 'backwpup_cfg_showadminbar', FALSE ) ) { + if ( get_site_option( 'backwpup_cfg_showadminbar' ) ) { add_action( 'init', array( 'BackWPup_Adminbar', 'get_instance' ) ); } //only in backend diff --git a/inc/class-admin.php b/inc/class-admin.php index b0f37462..0e2572a5 100644 --- a/inc/class-admin.php +++ b/inc/class-admin.php @@ -49,6 +49,26 @@ public function __construct() { add_action( 'profile_update', array( $this, 'save_profile_update' ) ); new BackWPup_EasyCron(); + + if ( ! class_exists( 'backwpup_pro' ) ) { + $lang = substr( get_locale(), 0 ,2 ); + if ( $lang !== 'de' ) { + $lang = 'en'; + } + $message_box = new BackWPup_Message_Box( 'campaign_2016_06' ); + $message_box->set_campaign_to_date( '2016-06-20' ); + $message_box->set_box_html( + '' + ); + $message_box->init_hooks(); + } + + $message_box = new BackWPup_Message_Box( 'restore_beta_survey' ); + $message_box->set_campaign_to_date( '2016-06-30' ); + $message_box->set_box_html( + '' . __( 'BackWPup Restore function is coming! Participate in our survey and with a little bit of luck you win a BackWPup Pro licence!', 'backwpup' ) . '' + ); + $message_box->init_hooks(); } /** @@ -63,7 +83,109 @@ public static function get_instance() { return self::$instance; } - private function __clone() {} + /** + * Admin init function + */ + public static function admin_css() { + + //register js and css for BackWPup + if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { + wp_enqueue_style( 'backwpup', BackWPup::get_plugin_data( 'URL' ) . '/assets/css/backwpup.css', array(), time(), 'screen' ); + } else { + wp_enqueue_style( 'backwpup', BackWPup::get_plugin_data( 'URL' ) . '/assets/css/backwpup.min.css', array(), BackWPup::get_plugin_data( 'Version' ), 'screen' ); + } + } + + /** + * Load for all BackWPup pages + */ + public static function init_general() { + + add_thickbox(); + + //register js and css for BackWPup + if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { + wp_register_script( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/assets/js/general.js', array( 'jquery' ), time(), false ); + } else { + wp_register_script( 'backwpupgeneral', BackWPup::get_plugin_data( 'URL' ) . '/assets/js/general.min.js', array( 'jquery' ), BackWPup::get_plugin_data( 'Version' ), false ); + } + + //add Help + BackWPup_Help::help(); + } + + /** + * Add Message (across site loadings) + * + * @param $message string Message test + * @param $error bool ist it a error message + */ + public static function message( $message, $error = FALSE ) { + + if ( empty( $message ) ) { + return; + } + + $saved_message = self::get_messages(); + + if ( $error ) + $saved_message[ 'error' ][] = $message; + else + $saved_message[ 'updated' ][] = $message; + + update_site_option( 'backwpup_messages', $saved_message ); + } + + /** + * Get all Message that not displayed + * + * @return array + */ + public static function get_messages() { + + return get_site_option( 'backwpup_messages', array() ); + } + + /** + * Display Messages + * + * @param bool $echo + * @return string + */ + public static function display_messages( $echo = TRUE ) { + + $message_updated= ''; + $message_error = ''; + $saved_message = self::get_messages(); + $message_id = ' id="message"'; + + if( empty( $saved_message ) ) + return ''; + + if ( ! empty( $saved_message[ 'updated' ] ) ) { + foreach( $saved_message[ 'updated' ] as $msg ) + $message_updated .= '
' . $msg . '
'; + } + if ( ! empty( $saved_message[ 'error' ] ) ) { + foreach( $saved_message[ 'error' ] as $msg ) + $message_error .= '' . $msg . '
'; + } + + update_site_option( 'backwpup_messages', array() ); + + if ( ! empty( $message_updated ) ) { + $message_updated = '' . $msg . '
'; - } - if ( ! empty( $saved_message[ 'error' ] ) ) { - foreach( $saved_message[ 'error' ] as $msg ) - $message_error .= '' . $msg . '
'; - } - - update_site_option( 'backwpup_messages', array() ); - - if ( ! empty( $message_updated ) ) { - $message_updated = '/wp-content/. Push them to an external storage service if you don’t want to save the backups on the same server. With a single backup archive you are able to restore an installation. Use a tool like phpMyAdmin or a plugin like Adminer to restore your database backup files.', 'backwpup' ); ?>
set up a backup job? You can use the wizards or plan your backup in expert mode.', 'backwpup' ), network_admin_url( 'admin.php').'?page=backwpupeditjob' , network_admin_url( 'admin.php').'?page=backwpupwizard' ) ); ?>
/wp-content/. Push them to an external storage service if you don’t want to save the backups on the same server. With a single backup archive you are able to restore an installation. Use a tool like phpMyAdmin or a plugin like Adminer to restore your database backup files.', 'backwpup' ); ?>
+ | + | |
---|---|---|
' . sprintf( '' . esc_html__( 'working since %d seconds', 'backwpup' ) . '', $runtime ) . ' | '; + echo '' . esc_html ( $job_object->job[ 'name' ] ) . ' '; + echo "" . esc_html__( 'Abort', 'backwpup' ) . ""; + echo " | |
' . sprintf( __( '%1$s at %2$s', 'backwpup' ), date_i18n( get_option( 'date_format' ), $nextrun, TRUE ), date_i18n( get_option( 'time_format' ), $nextrun, TRUE ) ) . ' | '; + else + echo '' . esc_html__( 'Not scheduled!', 'backwpup' ) . ' | '; + + echo '' . esc_html($name) . ' |
' . esc_html__( 'none', 'backwpup' ) . ' |
- | - | |
---|---|---|
' . sprintf( '' . esc_html__( 'working since %d seconds', 'backwpup' ) . '', $runtime ) . ' | '; - echo '' . esc_html ( $job_object->job[ 'name' ] ) . ' '; - echo "" . esc_html__( 'Abort', 'backwpup' ) . ""; - echo " | |
' . sprintf( __( '%1$s at %2$s', 'backwpup' ), date_i18n( get_option( 'date_format' ), $nextrun, TRUE ), date_i18n( get_option( 'time_format' ), $nextrun, TRUE ) ) . ' | '; - else - echo '' . esc_html__( 'Not scheduled!', 'backwpup' ) . ' | '; - - echo '' . esc_html($name) . ' |
' . esc_html__( 'none', 'backwpup' ) . ' |