| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: ManageWP - Worker |
| 4 |
Plugin URI: http://managewp.com/ |
| 5 |
Description: Manage all your blogs from one dashboard. |
| 6 |
Author: Prelovac Media |
| 7 |
Version: 3.6.3 |
| 8 |
Author URI: http://prelovac.com/ |
| 9 |
*/ |
| 10 |
|
| 11 |
// PHP warnings can break our XML stuffs |
| 12 |
|
| 13 |
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') |
| 14 |
{ |
| 15 |
error_reporting(E_ERROR); |
| 16 |
} |
| 17 |
|
| 18 |
define('MMB_WORKER_VERSION', '3.6.3'); |
| 19 |
|
| 20 |
global $wpdb, $mmb_plugin_dir, $mmb_plugin_url; |
| 21 |
|
| 22 |
$mmb_plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__)); |
| 23 |
$mmb_plugin_url = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)); |
| 24 |
//$mmb_plugin_dir = WP_PLUGIN_DIR . '/manage-multiple-blogs-worker'; |
| 25 |
//$mmb_plugin_url = WP_PLUGIN_URL . '/manage-multiple-blogs-worker'; |
| 26 |
|
| 27 |
require_once(ABSPATH . 'wp-includes/class-IXR.php'); |
| 28 |
require_once("$mmb_plugin_dir/helper.class.php"); |
| 29 |
require_once("$mmb_plugin_dir/ende.class.php"); |
| 30 |
require_once("$mmb_plugin_dir/core.class.php"); |
| 31 |
require_once("$mmb_plugin_dir/comment.class.php"); |
| 32 |
require_once("$mmb_plugin_dir/plugin.class.php"); |
| 33 |
require_once("$mmb_plugin_dir/theme.class.php"); |
| 34 |
require_once("$mmb_plugin_dir/category.class.php"); |
| 35 |
require_once("$mmb_plugin_dir/wp.class.php"); |
| 36 |
require_once("$mmb_plugin_dir/page.class.php"); |
| 37 |
require_once("$mmb_plugin_dir/post.class.php"); |
| 38 |
require_once("$mmb_plugin_dir/stats.class.php"); |
| 39 |
require_once("$mmb_plugin_dir/user.class.php"); |
| 40 |
require_once("$mmb_plugin_dir/tags.class.php"); |
| 41 |
require_once("$mmb_plugin_dir/backup.class.php"); |
| 42 |
require_once("$mmb_plugin_dir/clone.class.php"); |
| 43 |
require_once("$mmb_plugin_dir/mmb.wp.upgrader.php"); |
| 44 |
|
| 45 |
//class Mmb_IXR extends IXR_Server{ |
| 46 |
// |
| 47 |
//} |
| 48 |
|
| 49 |
$mmb_core = new Mmb_Core(); |
| 50 |
register_activation_hook(__FILE__, array($mmb_core, 'install')); |
| 51 |
|
| 52 |
function mmb_worker_upgrade($args) { |
| 53 |
global $mmb_core; |
| 54 |
return $mmb_core->update_this_plugin($args); |
| 55 |
} |
| 56 |
|
| 57 |
function mmb_stats_get($args) |
| 58 |
{ |
| 59 |
global $mmb_core; |
| 60 |
return $mmb_core->get_stats_instance()->get($args); |
| 61 |
} |
| 62 |
|
| 63 |
function mmb_stats_server_get($args) { |
| 64 |
global $mmb_core; |
| 65 |
return $mmb_core->get_stats_instance()->get_server_stats($args); |
| 66 |
} |
| 67 |
|
| 68 |
function mmb_stats_hit_count_get($args) { |
| 69 |
global $mmb_core; |
| 70 |
return $mmb_core->get_stats_instance()->get_hit_count($args); |
| 71 |
} |
| 72 |
|
| 73 |
function mmb_plugin_get_list($args) |
| 74 |
{ |
| 75 |
global $mmb_core; |
| 76 |
return $mmb_core->get_plugin_instance()->get_list($args); |
| 77 |
} |
| 78 |
|
| 79 |
function mmb_plugin_activate($args) |
| 80 |
{ |
| 81 |
global $mmb_core; |
| 82 |
return $mmb_core->get_plugin_instance()->activate($args); |
| 83 |
} |
| 84 |
|
| 85 |
function mmb_plugin_deactivate($args) |
| 86 |
{ |
| 87 |
global $mmb_core; |
| 88 |
return $mmb_core->get_plugin_instance()->deactivate($args); |
| 89 |
} |
| 90 |
|
| 91 |
function mmb_plugin_upgrade($args) |
| 92 |
{ |
| 93 |
global $mmb_core; |
| 94 |
return $mmb_core->get_plugin_instance()->upgrade($args); |
| 95 |
} |
| 96 |
|
| 97 |
function mmb_plugin_upgrade_multiple($args) |
| 98 |
{ |
| 99 |
global $mmb_core; |
| 100 |
return $mmb_core->get_plugin_instance()->upgrade_multiple($args); |
| 101 |
} |
| 102 |
|
| 103 |
function mmb_plugin_upgrade_all($args) |
| 104 |
{ |
| 105 |
global $mmb_core; |
| 106 |
return $mmb_core->get_plugin_instance()->upgrade_all($args); |
| 107 |
} |
| 108 |
|
| 109 |
function mmb_plugin_delete($args) |
| 110 |
{ |
| 111 |
global $mmb_core; |
| 112 |
return $mmb_core->get_plugin_instance()->delete($args); |
| 113 |
} |
| 114 |
|
| 115 |
function mmb_plugin_install($args) |
| 116 |
{ |
| 117 |
global $mmb_core; |
| 118 |
return $mmb_core->get_plugin_instance()->install($args); |
| 119 |
} |
| 120 |
|
| 121 |
function mmb_plugin_upload_by_url($args) |
| 122 |
{ |
| 123 |
global $mmb_core; |
| 124 |
return $mmb_core->get_plugin_instance()->upload_by_url($args); |
| 125 |
} |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
function mmb_theme_get_list($args) |
| 130 |
{ |
| 131 |
global $mmb_core; |
| 132 |
return $mmb_core->get_theme_instance()->get_list($args); |
| 133 |
} |
| 134 |
|
| 135 |
function mmb_theme_activate($args) |
| 136 |
{ |
| 137 |
global $mmb_core; |
| 138 |
return $mmb_core->get_theme_instance()->activate($args); |
| 139 |
} |
| 140 |
|
| 141 |
function mmb_theme_delete($args) |
| 142 |
{ |
| 143 |
global $mmb_core; |
| 144 |
return $mmb_core->get_theme_instance()->delete($args); |
| 145 |
} |
| 146 |
|
| 147 |
function mmb_theme_install($args) |
| 148 |
{ |
| 149 |
global $mmb_core; |
| 150 |
return $mmb_core->get_theme_instance()->install($args); |
| 151 |
} |
| 152 |
|
| 153 |
function mmb_theme_upgrade($args) |
| 154 |
{ |
| 155 |
global $mmb_core; |
| 156 |
return $mmb_core->get_theme_instance()->upgrade($args); |
| 157 |
} |
| 158 |
|
| 159 |
function mmb_themes_upgrade($args) |
| 160 |
{ |
| 161 |
global $mmb_core; |
| 162 |
return $mmb_core->get_theme_instance()->upgrade_all($args); |
| 163 |
} |
| 164 |
|
| 165 |
function mmb_theme_upload_by_url($args) |
| 166 |
{ |
| 167 |
global $mmb_core; |
| 168 |
return $mmb_core->get_theme_instance()->upload_theme_by_url($args); |
| 169 |
} |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
function mmb_wp_checkversion($args) |
| 175 |
{ |
| 176 |
global $mmb_core; |
| 177 |
return $mmb_core->get_wp_instance()->check_version($args); |
| 178 |
} |
| 179 |
|
| 180 |
function mmb_wp_upgrade($args) |
| 181 |
{ |
| 182 |
global $mmb_core; |
| 183 |
return $mmb_core->get_wp_instance()->upgrade($args); |
| 184 |
} |
| 185 |
|
| 186 |
function mmb_wp_get_updates($args) |
| 187 |
{ |
| 188 |
global $mmb_core; |
| 189 |
return $mmb_core->get_wp_instance()->get_updates($args); |
| 190 |
} |
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
function mmb_cat_get_list($args) |
| 198 |
{ |
| 199 |
global $mmb_core; |
| 200 |
return $mmb_core->get_category_instance()->get_list($args); |
| 201 |
} |
| 202 |
|
| 203 |
function mmb_cat_update($args) |
| 204 |
{ |
| 205 |
global $mmb_core; |
| 206 |
return $mmb_core->get_category_instance()->update($args); |
| 207 |
} |
| 208 |
|
| 209 |
function mmb_cat_add($args) |
| 210 |
{ |
| 211 |
global $mmb_core; |
| 212 |
return $mmb_core->get_category_instance()->add($args); |
| 213 |
} |
| 214 |
|
| 215 |
|
| 216 |
//Tag start |
| 217 |
|
| 218 |
|
| 219 |
function mmb_tag_get_list($args) |
| 220 |
{ |
| 221 |
global $mmb_core; |
| 222 |
return $mmb_core->get_tag_instance()->get_list($args); |
| 223 |
} |
| 224 |
|
| 225 |
function mmb_tag_update($args) |
| 226 |
{ |
| 227 |
global $mmb_core; |
| 228 |
return $mmb_core->get_tag_instance()->update($args); |
| 229 |
} |
| 230 |
|
| 231 |
function mmb_tag_add($args) |
| 232 |
{ |
| 233 |
global $mmb_core; |
| 234 |
return $mmb_core->get_tag_instance()->add($args); |
| 235 |
} |
| 236 |
|
| 237 |
function mmb_tag_delete($args) |
| 238 |
{ |
| 239 |
global $mmb_core; |
| 240 |
return $mmb_core->get_tag_instance()->delete($args); |
| 241 |
} |
| 242 |
////End of tag |
| 243 |
|
| 244 |
function mmb_page_get_edit_data($args) |
| 245 |
{ |
| 246 |
global $mmb_core; |
| 247 |
return $mmb_core->get_page_instance()->get_edit_data($args); |
| 248 |
} |
| 249 |
|
| 250 |
function mmb_page_get_new_data($args) |
| 251 |
{ |
| 252 |
global $mmb_core; |
| 253 |
return $mmb_core->get_page_instance()->get_new_data($args); |
| 254 |
} |
| 255 |
|
| 256 |
function mmb_page_update($args) |
| 257 |
{ |
| 258 |
global $mmb_core; |
| 259 |
return $mmb_core->get_page_instance()->update($args); |
| 260 |
} |
| 261 |
|
| 262 |
function mmb_page_create($args) |
| 263 |
{ |
| 264 |
global $mmb_core; |
| 265 |
return $mmb_core->get_page_instance()->create($args); |
| 266 |
} |
| 267 |
|
| 268 |
function mmb_post_get_list($args) |
| 269 |
{ |
| 270 |
global $mmb_core; |
| 271 |
return $mmb_core->get_post_instance()->get_list($args); |
| 272 |
} |
| 273 |
|
| 274 |
function mmb_post_get_edit_data($args) |
| 275 |
{ |
| 276 |
global $mmb_core; |
| 277 |
return $mmb_core->get_post_instance()->get_edit_data($args); |
| 278 |
} |
| 279 |
|
| 280 |
function mmb_post_update($args) |
| 281 |
{ |
| 282 |
global $mmb_core; |
| 283 |
return $mmb_core->get_post_instance()->update($args); |
| 284 |
} |
| 285 |
|
| 286 |
function mmb_post_get_new_data($args) |
| 287 |
{ |
| 288 |
global $mmb_core; |
| 289 |
return $mmb_core->get_post_instance()->get_new_data($args); |
| 290 |
} |
| 291 |
|
| 292 |
function mmb_post_create($args) |
| 293 |
{ |
| 294 |
global $mmb_core; |
| 295 |
return $mmb_core->get_post_instance()->create($args); |
| 296 |
} |
| 297 |
|
| 298 |
function mmb_post_publish($args) |
| 299 |
{ |
| 300 |
global $mmb_core; |
| 301 |
return $mmb_core->get_post_instance()->publish($args); |
| 302 |
} |
| 303 |
|
| 304 |
function mmb_post_checksum($args) |
| 305 |
{ |
| 306 |
global $mmb_core; |
| 307 |
return $mmb_core->get_post_instance()->checksum($args); |
| 308 |
} |
| 309 |
|
| 310 |
function mmb_user_change_password($args) |
| 311 |
{ |
| 312 |
global $mmb_core; |
| 313 |
return $mmb_core->get_user_instance()->change_password($args); |
| 314 |
} |
| 315 |
|
| 316 |
|
| 317 |
function mmb_bulk_edit_comment($args) { |
| 318 |
global $mmb_core; |
| 319 |
return $mmb_core->get_comment_instance()->bulk_edit_comments($args); |
| 320 |
} |
| 321 |
|
| 322 |
function mmb_get_comment_count($args) { |
| 323 |
global $mmb_core; |
| 324 |
return $mmb_core->get_comment_instance()->get_comment_count($args); |
| 325 |
} |
| 326 |
|
| 327 |
function mmb_restore_comment($args) { |
| 328 |
global $mmb_core; |
| 329 |
return $mmb_core->get_comment_instance()->restore_comment($args); |
| 330 |
} |
| 331 |
|
| 332 |
function mmb_backup_now($args) { |
| 333 |
global $mmb_core; |
| 334 |
return $mmb_core->get_backup_instance()->backup($args); |
| 335 |
} |
| 336 |
|
| 337 |
function mmb_restore_now($args) { |
| 338 |
global $mmb_core; |
| 339 |
return $mmb_core->get_backup_instance()->restore($args); |
| 340 |
} |
| 341 |
|
| 342 |
function mmb_get_backup_url($args) { |
| 343 |
global $mmb_core; |
| 344 |
return $mmb_core->get_backup_instance()->get_backup_details($args); |
| 345 |
} |
| 346 |
|
| 347 |
function mmb_weekly_backup($args) { |
| 348 |
global $mmb_core; |
| 349 |
return $mmb_core->get_backup_instance()->get_weekly_backup($args); |
| 350 |
} |
| 351 |
|
| 352 |
function mmb_geet_last_worker_message($args) { |
| 353 |
global $mmb_core; |
| 354 |
return $mmb_core->_get_last_worker_message(); |
| 355 |
} |
| 356 |
?> |