Backup and Restore WordPress – WPBackItUp Backup Plugin - Version 1.1.0

Version Description

  • Fixed bugs with addons system.
Download this release

Release Info

Developer jcpeden
Plugin Icon 128x128 Backup and Restore WordPress – WPBackItUp Backup Plugin
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.8 to 1.1.0

Files changed (3) hide show
  1. includes/admin_page.php +1 -1
  2. readme.txt +22 -10
  3. wp-backitup.php +67 -9
includes/admin_page.php CHANGED
@@ -1 +1 @@
1
- <?php
1
+ <?php
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wpbackitup.com
4
  Tags: backup wordpress, database backup, backup database, download database, backup and restore, restoring wordpress, restore wordpress, restore wordpress backup,
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -47,28 +47,28 @@ Sure! The backup zips generated by WP Backitup contain a database dump and a cop
47
  Yes, purchase and download the <a href="http://www.wpbackitup.com/addons/" title="WP Backitup Restoration Addon">WP Backitup Restoration Addon</a>. Once installed, you'll be able to restore you backup zips without FTP or MySQL.
48
 
49
  = Will the plugin work on shared hosting/sub domains/webhost xxx? =
50
- It is tested on a wide variety of hosting environments and site configurations. Please use the <a href="http://wordpress.org/support/plugin/wp-backitup">support forum</a> if you are having trouble.
51
 
52
  = Will WP Backitup work on Windows hosting? =
53
- Yes.
54
 
55
  = Are you going to be making progress bars both for backing up and restoring with this plugin? =
56
- This will be available in a future release.
57
 
58
- = Can this plugin back to Amazon S3/Dropbox? =
59
- This will be available in a future release.
60
 
61
  = Is there an auto back up schedule feature? =
62
- This will be available in a future release.
63
 
64
  = Will the plugin work with Wordpres version x.x? =
65
- WP Backitup is untested on older versions of Wordpress. Please feel free to try it and use the <a href="http://wordpress.org/support/plugin/wp-backitup">support forum</a> or the voting system on the <a href="http://wordpress.org/support/plugin/wp-backitup">plugin page</a> to tell others.
66
 
67
  = Can this backup one version of WordPress to a different version? =
68
  No. It is absolutely critical that your WordPress versions are exactly the same.
69
 
70
  = Will WP Backitup work on WordPress Multisite? =
71
- The plugin can be network-activated within WPMS but sites must be backed-up individually.
72
 
73
  = Does the plugin copy the database details as well? =
74
  Yes, a database dump is created with each backup.
@@ -83,7 +83,7 @@ Yes. You must install the WP Backitup plugin on the site you wish to backup and
83
  WP Backitup creates a database dump and a backup of all your themes, plugins and uploads.
84
 
85
  = Do you have any ideas about how large a blog is too big for WP Backitup to handle? =
86
- I`ve tested up to 15 themes, 40 plugins and 350 posts/pages without any issues.
87
 
88
  = Do you do regularly update this product to match with WP version updates? =
89
  Yes.
@@ -95,6 +95,12 @@ Yes.
95
 
96
  == Changelog ==
97
 
 
 
 
 
 
 
98
  = 1.0.8 =
99
  * Modified plugin administration and loaded menu tab in main toolbar.
100
 
@@ -124,6 +130,12 @@ Yes.
124
 
125
  == Upgrade Notice ==
126
 
 
 
 
 
 
 
127
  = 1.0.8 =
128
  * Recommended upgrade. Added links to admin menu.
129
 
4
  Tags: backup wordpress, database backup, backup database, download database, backup and restore, restoring wordpress, restore wordpress, restore wordpress backup,
5
  Requires at least: 3.4
6
  Tested up to: 3.5
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
47
  Yes, purchase and download the <a href="http://www.wpbackitup.com/addons/" title="WP Backitup Restoration Addon">WP Backitup Restoration Addon</a>. Once installed, you'll be able to restore you backup zips without FTP or MySQL.
48
 
49
  = Will the plugin work on shared hosting/sub domains/webhost xxx? =
50
+ Yes
51
 
52
  = Will WP Backitup work on Windows hosting? =
53
+ Yes
54
 
55
  = Are you going to be making progress bars both for backing up and restoring with this plugin? =
56
+ Not at this time.
57
 
58
+ = Can this plugin back to Amazon S3? =
59
+ Not at this time.
60
 
61
  = Is there an auto back up schedule feature? =
62
+ Not at this time.
63
 
64
  = Will the plugin work with Wordpres version x.x? =
65
+ The plugin works on the latest release of WordPress and is updated to function with all new releases.
66
 
67
  = Can this backup one version of WordPress to a different version? =
68
  No. It is absolutely critical that your WordPress versions are exactly the same.
69
 
70
  = Will WP Backitup work on WordPress Multisite? =
71
+ It is untested with Wordpress multisite and probably will not work.
72
 
73
  = Does the plugin copy the database details as well? =
74
  Yes, a database dump is created with each backup.
83
  WP Backitup creates a database dump and a backup of all your themes, plugins and uploads.
84
 
85
  = Do you have any ideas about how large a blog is too big for WP Backitup to handle? =
86
+ I`ve tested up to 5 themes, 20 plugins and 100 posts/pages without any issues.
87
 
88
  = Do you do regularly update this product to match with WP version updates? =
89
  Yes.
95
 
96
  == Changelog ==
97
 
98
+ = 1.1.0 =
99
+ * Fixed bugs with addons system.
100
+
101
+ = 1.0.9 =
102
+ * Added Presstrends tracking code.
103
+
104
  = 1.0.8 =
105
  * Modified plugin administration and loaded menu tab in main toolbar.
106
 
130
 
131
  == Upgrade Notice ==
132
 
133
+ = 1.1.0 =
134
+ * Non-critical upgrade. Fixed bugs with addons system that caused problems for some users.
135
+
136
+ = 1.0.9 =
137
+ * Non-essential upgrade. Added Presstrends code.
138
+
139
  = 1.0.8 =
140
  * Recommended upgrade. Added links to admin menu.
141
 
wp-backitup.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP Backitup
4
- * Plugin URI: http://wordpress.org/extend/plugins/wp-backitup/
5
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
6
- * Version: 1.0.8
7
  * Author: John Peden
8
- * Author URI: http://www.wpbackitup.com
9
  * License: GPLv2 or later
10
  * Text Domain: wp-backitup
11
  */
@@ -19,10 +19,11 @@ define("WPBACKITUP_PLUGIN_URL", WP_PLUGIN_URL ."/wp-backitup/");
19
  define("WPBACKITUP_PLUGIN_PATH", WP_PLUGIN_DIR."/wp-backitup/");
20
  define("WPBACKITUP_DIRNAME", "wp-backitup");
21
  define("BACKUP_PATH", WPBACKITUP_PLUGIN_PATH .'backups/');
 
22
 
23
  //load admin menu
24
  function wpbackitup_admin_menus() {
25
- $wpbackituppage = add_menu_page( __( 'WP Backitup', 'wpBackitup' ), __( 'Backup/Restore', 'wpBackitup' ), 'manage_options', 'wp-backitup', 'wpbackitup_admin', plugin_dir_url(__FILE__ ) .'images/icon.png', 77);
26
  add_action('admin_print_scripts-'.$wpbackituppage, 'wpbackitup_javascript');
27
  add_action('admin_print_styles-' .$wpbackituppage, 'wpbackitup_stylesheet' );
28
  }
@@ -69,9 +70,66 @@ function wpbackitup_logreader() {
69
  }
70
  add_action('wp_ajax_wpbackitup_logreader', 'wpbackitup_logreader');
71
 
72
- //load addons
73
- if(is_dir(WPBACKITUP_PLUGIN_PATH . "addons")){
74
- foreach(glob(WPBACKITUP_PLUGIN_PATH . "addons/*/") as $addon) {
75
- include_once $addon .'index.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  }
77
- }
 
 
1
  <?php
2
  /**
3
  * Plugin Name: WP Backitup
4
+ * Plugin URI: http://www.wpbackitup.com
5
  * Description: Backup your content, settings, themes, plugins and media in just a few simple clicks.
6
+ * Version: 1.1.0
7
  * Author: John Peden
8
+ * Author URI: http://www.johncpeden.com
9
  * License: GPLv2 or later
10
  * Text Domain: wp-backitup
11
  */
19
  define("WPBACKITUP_PLUGIN_PATH", WP_PLUGIN_DIR."/wp-backitup/");
20
  define("WPBACKITUP_DIRNAME", "wp-backitup");
21
  define("BACKUP_PATH", WPBACKITUP_PLUGIN_PATH .'backups/');
22
+ define("BACKUP_PATH", WPBACKITUP_PLUGIN_PATH .'backups/');
23
 
24
  //load admin menu
25
  function wpbackitup_admin_menus() {
26
+ $wpbackituppage = add_menu_page( __( 'WP Backitup', 'wpBackitup' ), __( 'Backup', 'wpBackitup' ), 'manage_options', 'wp-backitup', 'wpbackitup_admin', plugin_dir_url(__FILE__ ) .'images/icon.png', 77);
27
  add_action('admin_print_scripts-'.$wpbackituppage, 'wpbackitup_javascript');
28
  add_action('admin_print_styles-' .$wpbackituppage, 'wpbackitup_stylesheet' );
29
  }
70
  }
71
  add_action('wp_ajax_wpbackitup_logreader', 'wpbackitup_logreader');
72
 
73
+ /**
74
+ * PressTrends Plugin API
75
+ */
76
+ function presstrends_WPBackitup_plugin() {
77
+
78
+ // PressTrends Account API Key
79
+ $api_key = 'rwiyhqfp7eioeh62h6t3ulvcghn2q8cr7j5x';
80
+ $auth = 'lpa0nvlhyzbyikkwizk4navhtoaqujrbw';
81
+
82
+ // Start of Metrics
83
+ global $wpdb;
84
+ $data = get_transient( 'presstrends_cache_data' );
85
+ if ( !$data || $data == '' ) {
86
+ $api_base = 'http://api.presstrends.io/index.php/api/pluginsites/update/auth/';
87
+ $url = $api_base . $auth . '/api/' . $api_key . '/';
88
+
89
+ $count_posts = wp_count_posts();
90
+ $count_pages = wp_count_posts( 'page' );
91
+ $comments_count = wp_count_comments();
92
+
93
+ // wp_get_theme was introduced in 3.4, for compatibility with older versions, let's do a workaround for now.
94
+ if ( function_exists( 'wp_get_theme' ) ) {
95
+ $theme_data = wp_get_theme();
96
+ $theme_name = urlencode( $theme_data->Name );
97
+ } else {
98
+ $theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
99
+ $theme_name = $theme_data['Name'];
100
+ }
101
+
102
+ $plugin_name = '&';
103
+ foreach ( get_plugins() as $plugin_info ) {
104
+ $plugin_name .= $plugin_info['Name'] . '&';
105
+ }
106
+ // CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
107
+ $plugin_data = get_plugin_data( __FILE__ );
108
+ $posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
109
+ $data = array(
110
+ 'url' => stripslashes( str_replace( array( 'http://', '/', ':' ), '', site_url() ) ),
111
+ 'posts' => $count_posts->publish,
112
+ 'pages' => $count_pages->publish,
113
+ 'comments' => $comments_count->total_comments,
114
+ 'approved' => $comments_count->approved,
115
+ 'spam' => $comments_count->spam,
116
+ 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
117
+ 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0,
118
+ 'theme_version' => $plugin_data['Version'],
119
+ 'theme_name' => $theme_name,
120
+ 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ),
121
+ 'plugins' => count( get_option( 'active_plugins' ) ),
122
+ 'plugin' => urlencode( $plugin_name ),
123
+ 'wpversion' => get_bloginfo( 'version' ),
124
+ );
125
+
126
+ foreach ( $data as $k => $v ) {
127
+ $url .= $k . '/' . $v . '/';
128
+ }
129
+ wp_remote_get( $url );
130
+ set_transient( 'presstrends_cache_data', $data, 60 * 60 * 24 );
131
+ }
132
  }
133
+
134
+ // PressTrends WordPress Action
135
+ add_action('admin_init', 'presstrends_WPBackitup_plugin');