static function createPost($new_post, $post_custom, $post_category, $post_featured_image, $upload_dir, $post_tags)
 {
     global $current_user;
     $wprocket_fields = array('lazyload', 'lazyload_iframes', 'minify_html', 'minify_css', 'minify_js', 'cdn');
     $wprocket_activated = false;
     if (MainWPChildWPRocket::isActivated()) {
         if (function_exists('get_rocket_option')) {
             $wprocket_activated = true;
             foreach ($wprocket_fields as $field) {
                 if (!isset($post_custom['_rocket_exclude_' . $field])) {
                     // check not exclude only
                     if (!get_rocket_option($field)) {
                         $post_custom['_rocket_exclude_' . $field] = array(true);
                         // set as excluded
                     }
                 }
             }
         }
     }
     if (!$wprocket_activated) {
         foreach ($wprocket_fields as $field) {
             if (isset($post_custom['_rocket_exclude_' . $field])) {
                 unset($post_custom['_rocket_exclude_' . $field]);
             }
         }
     }
     //Set up a new post (adding addition information)
     $usr = get_user_by('login', $_POST['user']);
     //$new_post['post_author'] = $current_user->ID;
     $is_robot_post = false;
     if (isset($_POST['isMainWPRobot']) && !empty($_POST['isMainWPRobot'])) {
         $is_robot_post = true;
     }
     $post_author = isset($new_post['post_author']) ? $new_post['post_author'] : $usr->ID;
     if ($is_robot_post) {
         if ($post_author == 1) {
             $new_post['post_author'] = $usr->ID;
         } else {
             if (!is_numeric($post_author)) {
                 $user_author = get_user_by('login', $post_author);
                 if ($user_author) {
                     $post_author = $user_author->ID;
                 } else {
                     $random_password = wp_generate_password($length = 12, $include_standard_special_chars = false);
                     $post_author = wp_create_user($post_author, $random_password, $post_author . "@asdf.com");
                 }
             }
         }
     } else {
         if (isset($new_post['custom_post_author']) && !empty($new_post['custom_post_author'])) {
             $_author = get_user_by('login', $new_post['custom_post_author']);
             if (!empty($_author)) {
                 $new_post['post_author'] = $_author->ID;
             } else {
                 $new_post['post_author'] = $usr->ID;
             }
             unset($new_post['custom_post_author']);
         }
     }
     $post_author = !empty($post_author) ? $post_author : $usr->ID;
     $new_post['post_author'] = $post_author;
     $is_ezine_post = !empty($post_custom['_ezine_post_article_source']) ? true : false;
     $terms = $new_post['_ezin_post_category'];
     unset($new_post['_ezin_post_category']);
     $is_post_plus = isset($post_custom['_mainwp_post_plus']) ? true : false;
     $wp_error = null;
     if ($is_ezine_post || $is_post_plus) {
         if (isset($new_post['post_date_gmt']) && !empty($new_post['post_date_gmt'])) {
             $post_date_timestamp = strtotime($new_post['post_date_gmt']) + get_option('gmt_offset') * 60 * 60;
             $new_post['post_date'] = date('Y-m-d H:i:s', $post_date_timestamp);
             $new_post['post_status'] = $post_date_timestamp <= current_time('timestamp') ? 'publish' : 'future';
         } else {
             $new_post['post_status'] = 'publish';
         }
     }
     $wpr_options = isset($_POST['wpr_options']) ? $_POST['wpr_options'] : array();
     //Search for all the images added to the new post
     //some images have a href tag to click to navigate to the image.. we need to replace this too
     $foundMatches = preg_match_all('/(<a[^>]+href=\\"(.*?)\\"[^>]*>)?(<img[^>\\/]*src=\\"((.*?)(png|gif|jpg|jpeg))\\")/ix', $new_post['post_content'], $matches, PREG_SET_ORDER);
     if (($foundMatches > 0 || $is_robot_post && isset($wpr_options['wpr_save_images']) && $wpr_options['wpr_save_images'] == "Yes") && !$is_ezine_post) {
         //We found images, now to download them so we can start balbal
         foreach ($matches as $match) {
             $hrefLink = $match[2];
             $imgUrl = $match[4];
             if (!isset($upload_dir['baseurl']) || strripos($imgUrl, $upload_dir['baseurl']) != 0) {
                 continue;
             }
             if (preg_match('/-\\d{3}x\\d{3}\\.[a-zA-Z0-9]{3,4}$/', $imgUrl, $imgMatches)) {
                 $search = $imgMatches[0];
                 $replace = '.' . $match[6];
                 $originalImgUrl = str_replace($search, $replace, $imgUrl);
             } else {
                 $originalImgUrl = $imgUrl;
             }
             try {
                 $downloadfile = MainWPHelper::uploadImage($originalImgUrl);
                 $localUrl = $downloadfile['url'];
                 $linkToReplaceWith = dirname($localUrl);
                 if ($hrefLink != '') {
                     $server = get_option('mainwp_child_server');
                     $serverHost = parse_url($server, PHP_URL_HOST);
                     if (!empty($serverHost) && strpos($hrefLink, $serverHost) !== false) {
                         $serverHref = "href=\"" . $serverHost;
                         $replaceServerHref = "href=\"" . parse_url($localUrl, PHP_URL_SCHEME) . "://" . parse_url($localUrl, PHP_URL_HOST);
                         $new_post['post_content'] = str_replace($serverHref, $replaceServerHref, $new_post['post_content']);
                     } else {
                         if (strpos($hrefLink, "http") !== false) {
                             $lnkToReplace = dirname($hrefLink);
                             if ($lnkToReplace != 'http:' && $lnkToReplace != 'https:') {
                                 $new_post['post_content'] = str_replace($lnkToReplace, $linkToReplaceWith, $new_post['post_content']);
                             }
                         }
                     }
                 }
                 $lnkToReplace = dirname($imgUrl);
                 if ($lnkToReplace != 'http:' && $lnkToReplace != 'https:') {
                     $new_post['post_content'] = str_replace($lnkToReplace, $linkToReplaceWith, $new_post['post_content']);
                 }
             } catch (Exception $e) {
             }
         }
     }
     if ($is_post_plus) {
         $random_publish_date = isset($post_custom['_saved_draft_random_publish_date']) ? $post_custom['_saved_draft_random_publish_date'] : false;
         $random_publish_date = is_array($random_publish_date) ? current($random_publish_date) : null;
         if (!empty($random_publish_date)) {
             $random_date_from = isset($post_custom['_saved_draft_publish_date_from']) ? $post_custom['_saved_draft_publish_date_from'] : 0;
             $random_date_from = is_array($random_date_from) ? current($random_date_from) : 0;
             $random_date_to = isset($post_custom['_saved_draft_publish_date_to']) ? $post_custom['_saved_draft_publish_date_to'] : 0;
             $random_date_to = is_array($random_date_to) ? current($random_date_to) : 0;
             $now = current_time('timestamp');
             if (empty($random_date_from)) {
                 $random_date_from = $now;
             }
             if (empty($random_date_to)) {
                 $random_date_to = $now;
             }
             if ($random_date_from == $now && $random_date_from == $random_date_to) {
                 $random_date_to = $now + 7 * 24 * 3600;
             }
             if ($random_date_from > $random_date_to) {
                 $tmp = $random_date_from;
                 $random_date_from = $random_date_to;
                 $random_date_to = $tmp;
             }
             $random_timestamp = rand($random_date_from, $random_date_to);
             $post_status = $random_timestamp <= current_time('timestamp') ? 'publish' : 'future';
             $new_post['post_status'] = $post_status;
             $new_post['post_date'] = date('Y-m-d H:i:s', $random_timestamp);
         }
     }
     if (isset($post_tags) && $post_tags != '') {
         $new_post['tags_input'] = $post_tags;
     }
     //Save the post to the wp
     remove_filter('content_save_pre', 'wp_filter_post_kses');
     // to fix brake scripts or html
     $post_status = $new_post['post_status'];
     $new_post['post_status'] = 'auto-draft';
     $new_post_id = wp_insert_post($new_post, $wp_error);
     //Show errors if something went wrong
     if (is_wp_error($wp_error)) {
         return $wp_error->get_error_message();
     }
     if (empty($new_post_id)) {
         return 'Undefined error';
     }
     wp_update_post(array('ID' => $new_post_id, 'post_status' => $post_status));
     if (!empty($terms)) {
         wp_set_object_terms($new_post_id, array_map(intval, $terms), 'category');
     }
     $permalink = get_permalink($new_post_id);
     $seo_ext_activated = false;
     if (class_exists('WPSEO_Meta') && class_exists('WPSEO_Admin')) {
         $seo_ext_activated = true;
     }
     //Set custom fields
     $not_allowed = array('_slug', '_tags', '_edit_lock', '_selected_sites', '_selected_groups', '_selected_by', '_categories', '_edit_last', '_sticky');
     $not_allowed[] = '_mainwp_boilerplate_sites_posts';
     $not_allowed[] = '_ezine_post_keyword';
     $not_allowed[] = '_ezine_post_display_sig';
     $not_allowed[] = '_ezine_post_remove_link';
     $not_allowed[] = '_ezine_post_grab_image';
     $not_allowed[] = '_ezine_post_grab_image_placement';
     $not_allowed[] = '_ezine_post_template_id';
     $not_allowed[] = '_mainwp_post_plus';
     $not_allowed[] = '_saved_as_draft';
     $not_allowed[] = '_saved_draft_categories';
     $not_allowed[] = '_saved_draft_tags';
     $not_allowed[] = '_saved_draft_random_privelege';
     $not_allowed[] = '_saved_draft_random_category';
     $not_allowed[] = '_saved_draft_random_publish_date';
     $not_allowed[] = '_saved_draft_publish_date_from';
     $not_allowed[] = '_saved_draft_publish_date_to';
     $not_allowed[] = '_post_to_only_existing_categories';
     $not_allowed[] = '_mainwp_robot_post_comments';
     $post_to_only_existing_categories = false;
     foreach ($post_custom as $meta_key => $meta_values) {
         if (!in_array($meta_key, $not_allowed)) {
             foreach ($meta_values as $meta_value) {
                 if (!$seo_ext_activated) {
                     // if Wordpress SEO plugin is not activated do not save yoast post meta
                     if (strpos($meta_key, "_yoast_wpseo_") === false) {
                         add_post_meta($new_post_id, $meta_key, $meta_value);
                     }
                 } else {
                     add_post_meta($new_post_id, $meta_key, $meta_value);
                 }
             }
         } else {
             if ($meta_key == '_sticky') {
                 foreach ($meta_values as $meta_value) {
                     if (base64_decode($meta_value) == 'sticky') {
                         stick_post($new_post_id);
                     }
                 }
             } else {
                 if ($meta_key == '_post_to_only_existing_categories') {
                     if (isset($meta_values[0]) && $meta_values[0]) {
                         $post_to_only_existing_categories = true;
                     }
                 }
             }
         }
     }
     // yoast seo extension
     if ($seo_ext_activated) {
         $_seo_opengraph_image = isset($post_custom[WPSEO_Meta::$meta_prefix . 'opengraph-image']) ? $post_custom[WPSEO_Meta::$meta_prefix . 'opengraph-image'] : array();
         $_seo_opengraph_image = current($_seo_opengraph_image);
         $_server_domain = "";
         $_server = get_option('mainwp_child_server');
         if (preg_match('/(https?:\\/\\/[^\\/]+\\/).+/', $_server, $matchs)) {
             $_server_domain = isset($matchs[1]) ? $matchs[1] : "";
         }
         // upload image if it on the server
         if (!empty($_seo_opengraph_image) && strpos($_seo_opengraph_image, $_server_domain) !== false) {
             try {
                 $upload = MainWPHelper::uploadImage($_seo_opengraph_image);
                 //Upload image to WP
                 if ($upload != null) {
                     update_post_meta($new_post_id, WPSEO_Meta::$meta_prefix . 'opengraph-image', $upload['url']);
                     //Add the image to the post!
                 }
             } catch (Exception $e) {
             }
         }
     }
     //If categories exist, create them (second parameter of wp_create_categories adds the categories to the post)
     include_once ABSPATH . 'wp-admin/includes/taxonomy.php';
     //Contains wp_create_categories
     if (isset($post_category) && $post_category != '') {
         $categories = explode(',', $post_category);
         if (count($categories) > 0) {
             if (!$post_to_only_existing_categories) {
                 $post_category = wp_create_categories($categories, $new_post_id);
             } else {
                 $cat_ids = array();
                 foreach ($categories as $cat) {
                     if ($id = category_exists($cat)) {
                         $cat_ids[] = $id;
                     }
                 }
                 if (count($cat_ids) > 0) {
                     wp_set_post_categories($new_post_id, $cat_ids);
                 }
             }
         }
     }
     //If featured image exists - set it
     if ($post_featured_image != null) {
         try {
             $upload = MainWPHelper::uploadImage($post_featured_image);
             //Upload image to WP
             if ($upload != null) {
                 update_post_meta($new_post_id, '_thumbnail_id', $upload['id']);
                 //Add the thumbnail to the post!
             }
         } catch (Exception $e) {
         }
     }
     // post plus extension process
     if ($is_post_plus) {
         $random_privelege = isset($post_custom['_saved_draft_random_privelege']) ? $post_custom['_saved_draft_random_privelege'] : null;
         $random_privelege = is_array($random_privelege) ? current($random_privelege) : null;
         $random_privelege_base = base64_decode($random_privelege);
         $random_privelege = unserialize($random_privelege_base);
         if (is_array($random_privelege) && count($random_privelege) > 0) {
             $random_post_authors = array();
             foreach ($random_privelege as $role) {
                 $users = get_users(array('role' => $role));
                 foreach ($users as $user) {
                     $random_post_authors[] = $user->ID;
                 }
             }
             if (count($random_post_authors) > 0) {
                 shuffle($random_post_authors);
                 $key = array_rand($random_post_authors);
                 wp_update_post(array('ID' => $new_post_id, 'post_author' => $random_post_authors[$key]));
             }
         }
         $random_category = isset($post_custom['_saved_draft_random_category']) ? $post_custom['_saved_draft_random_category'] : false;
         $random_category = is_array($random_category) ? current($random_category) : null;
         if (!empty($random_category)) {
             $cats = get_categories(array('type' => 'post', "hide_empty" => 0));
             $random_cats = array();
             if (is_array($cats)) {
                 foreach ($cats as $cat) {
                     $random_cats[] = $cat->term_id;
                 }
             }
             if (count($random_cats) > 0) {
                 shuffle($random_cats);
                 $key = array_rand($random_cats);
                 wp_set_post_categories($new_post_id, array($random_cats[$key]), false);
             }
         }
     }
     // end of post plus
     // MainWP Robot
     if ($is_robot_post) {
         $all_comments = $post_custom['_mainwp_robot_post_comments'];
         MainWPChildRobot::Instance()->wpr_insertcomments($new_post_id, $all_comments);
     }
     $ret['success'] = true;
     $ret['link'] = $permalink;
     $ret['added_id'] = $new_post_id;
     return $ret;
 }
 function getSiteStats($information = array(), $exit = true)
 {
     global $wp_version;
     if ($exit) {
         $this->updateExternalSettings();
     }
     MainWPHelper::update_option('mainwp_child_branding_disconnected', '', 'yes');
     $information['version'] = $this->version;
     $information['wpversion'] = $wp_version;
     $information['siteurl'] = get_option('siteurl');
     $information['nossl'] = get_option('mainwp_child_nossl') == 1 ? 1 : 0;
     include_once ABSPATH . '/wp-admin/includes/update.php';
     $timeout = 3 * 60 * 60;
     // 3minutes
     @set_time_limit($timeout);
     @ini_set('max_execution_time', $timeout);
     //Check for new versions
     if ($this->filterFunction != null) {
         add_filter('pre_site_transient_update_core', $this->filterFunction, 99);
     }
     if ($this->filterFunction != null) {
         add_filter('pre_transient_update_core', $this->filterFunction, 99);
     }
     @wp_version_check();
     $core_updates = get_core_updates();
     if (count($core_updates) > 0) {
         foreach ($core_updates as $core_update) {
             if ($core_update->response == 'latest') {
                 break;
             }
             if ($core_update->response == 'upgrade' && version_compare($wp_version, $core_update->current, '<=')) {
                 $information['wp_updates'] = $core_update->current;
             }
         }
     }
     if (!isset($information['wp_updates'])) {
         $information['wp_updates'] = null;
     }
     if ($this->filterFunction != null) {
         remove_filter('pre_site_transient_update_core', $this->filterFunction, 99);
     }
     if ($this->filterFunction != null) {
         remove_filter('pre_transient_update_core', $this->filterFunction, 99);
     }
     add_filter('default_option_active_plugins', array(&$this, 'default_option_active_plugins'));
     add_filter('option_active_plugins', array(&$this, 'default_option_active_plugins'));
     //First check for new premium updates
     $update_check = apply_filters('mwp_premium_update_check', array());
     if (!empty($update_check)) {
         foreach ($update_check as $updateFeedback) {
             if (is_array($updateFeedback['callback']) && isset($updateFeedback['callback'][0]) && isset($updateFeedback['callback'][1])) {
                 @call_user_func(array($updateFeedback['callback'][0], $updateFeedback['callback'][1]));
             } else {
                 if (is_string($updateFeedback['callback'])) {
                     @call_user_func($updateFeedback['callback']);
                 }
             }
         }
     }
     $informationPremiumUpdates = apply_filters('mwp_premium_update_notification', array());
     $premiumPlugins = array();
     $premiumThemes = array();
     if (is_array($informationPremiumUpdates)) {
         $premiumUpdates = array();
         $information['premium_updates'] = array();
         for ($i = 0; $i < count($informationPremiumUpdates); $i++) {
             if (!isset($informationPremiumUpdates[$i]['new_version'])) {
                 continue;
             }
             $slug = isset($informationPremiumUpdates[$i]['slug']) ? $informationPremiumUpdates[$i]['slug'] : $informationPremiumUpdates[$i]['Name'];
             if ($informationPremiumUpdates[$i]['type'] == 'plugin') {
                 $premiumPlugins[] = $slug;
             } else {
                 if ($informationPremiumUpdates[$i]['type'] == 'theme') {
                     $premiumThemes[] = $slug;
                 }
             }
             $new_version = $informationPremiumUpdates[$i]['new_version'];
             unset($informationPremiumUpdates[$i]['old_version']);
             unset($informationPremiumUpdates[$i]['new_version']);
             $information['premium_updates'][$slug] = $informationPremiumUpdates[$i];
             $information['premium_updates'][$slug]['update'] = (object) array('new_version' => $new_version, 'premium' => true, 'slug' => $slug);
             if (!in_array($slug, $premiumUpdates)) {
                 $premiumUpdates[] = $slug;
             }
         }
         MainWPHelper::update_option('mainwp_premium_updates', $premiumUpdates);
     }
     remove_filter('default_option_active_plugins', array(&$this, 'default_option_active_plugins'));
     remove_filter('option_active_plugins', array(&$this, 'default_option_active_plugins'));
     if ($this->filterFunction != null) {
         add_filter('pre_site_transient_update_plugins', $this->filterFunction, 99);
     }
     global $wp_current_filter;
     $wp_current_filter[] = 'load-plugins.php';
     @wp_update_plugins();
     include_once ABSPATH . '/wp-admin/includes/plugin.php';
     $plugin_updates = get_plugin_updates();
     if (is_array($plugin_updates)) {
         $information['plugin_updates'] = array();
         foreach ($plugin_updates as $slug => $plugin_update) {
             if (in_array($plugin_update->Name, $premiumPlugins)) {
                 continue;
             }
             $information['plugin_updates'][$slug] = $plugin_update;
         }
     }
     if ($this->filterFunction != null) {
         remove_filter('pre_site_transient_update_plugins', $this->filterFunction, 99);
     }
     if ($this->filterFunction != null) {
         add_filter('pre_site_transient_update_themes', $this->filterFunction, 99);
     }
     @wp_update_themes();
     include_once ABSPATH . '/wp-admin/includes/theme.php';
     $theme_updates = $this->upgrade_get_theme_updates();
     if (is_array($theme_updates)) {
         $information['theme_updates'] = array();
         foreach ($theme_updates as $slug => $theme_update) {
             $name = is_array($theme_update) ? $theme_update['Name'] : $theme_update->Name;
             if (in_array($name, $premiumThemes)) {
                 continue;
             }
             $information['theme_updates'][$slug] = $theme_update;
         }
     }
     if ($this->filterFunction != null) {
         remove_filter('pre_site_transient_update_themes', $this->filterFunction, 99);
     }
     $information['recent_comments'] = $this->get_recent_comments(array('approve', 'hold'), 5);
     $information['recent_posts'] = $this->get_recent_posts(array('publish', 'draft', 'pending', 'trash'), 5);
     $information['recent_pages'] = $this->get_recent_posts(array('publish', 'draft', 'pending', 'trash'), 5, 'page');
     $securityIssuess = 0;
     if (!MainWPSecurity::prevent_listing_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_wp_version_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_rsd_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_wlw_ok()) {
         $securityIssuess++;
     }
     //        if (!MainWPSecurity::remove_core_update_ok()) $securityIssuess++;
     //        if (!MainWPSecurity::remove_plugin_update_ok()) $securityIssuess++;
     //        if (!MainWPSecurity::remove_theme_update_ok()) $securityIssuess++;
     //        if (!MainWPSecurity::fix_file_permissions_ok()) $securityIssuess++;
     if (!MainWPSecurity::remove_database_reporting_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_php_reporting_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_scripts_version_ok() || !MainWPSecurity::remove_styles_version_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::admin_user_ok()) {
         $securityIssuess++;
     }
     if (!MainWPSecurity::remove_readme_ok()) {
         $securityIssuess++;
     }
     $information['securityIssues'] = $securityIssuess;
     //Directory listings!
     $information['directories'] = $this->scanDir(ABSPATH, 3);
     $cats = get_categories(array('hide_empty' => 0, 'hierarchical' => true));
     $categories = array();
     foreach ($cats as $cat) {
         $categories[] = $cat->name;
     }
     $information['categories'] = $categories;
     $information['totalsize'] = $this->getTotalFileSize();
     $information['dbsize'] = MainWPChildDB::get_size();
     $auths = get_option('mainwp_child_auth');
     $information['extauth'] = $auths && isset($auths[$this->maxHistory]) ? $auths[$this->maxHistory] : null;
     $plugins = $this->get_all_plugins_int(false);
     $themes = $this->get_all_themes_int(false);
     $information['plugins'] = $plugins;
     $information['themes'] = $themes;
     if (isset($_POST['optimize']) && $_POST['optimize'] == 1) {
         $information['users'] = $this->get_all_users_int();
     }
     if (isset($_POST['pluginConflicts']) && $_POST['pluginConflicts'] != false) {
         $pluginConflicts = json_decode(stripslashes($_POST['pluginConflicts']), true);
         $conflicts = array();
         if (count($pluginConflicts) > 0) {
             if ($plugins == false) {
                 $plugins = $this->get_all_plugins_int(false);
             }
             if (is_array($plugins) && is_array($pluginConflicts)) {
                 foreach ($plugins as $plugin) {
                     foreach ($pluginConflicts as $pluginConflict) {
                         if ($plugin['active'] == 1 && ($plugin['name'] == $pluginConflict || $plugin['slug'] == $pluginConflict)) {
                             $conflicts[] = $plugin['name'];
                         }
                     }
                 }
             }
         }
         if (count($conflicts) > 0) {
             $information['pluginConflicts'] = $conflicts;
         }
     }
     if (isset($_POST['themeConflicts']) && $_POST['themeConflicts'] != false) {
         $themeConflicts = json_decode(stripslashes($_POST['themeConflicts']), true);
         $conflicts = array();
         if (is_array($themeConflicts) && count($themeConflicts) > 0) {
             $theme = wp_get_theme()->get('Name');
             foreach ($themeConflicts as $themeConflict) {
                 if ($theme == $themeConflict) {
                     $conflicts[] = $theme;
                 }
             }
         }
         if (count($conflicts) > 0) {
             $information['themeConflicts'] = $conflicts;
         }
     }
     if (isset($_POST['othersData'])) {
         $othersData = json_decode(stripslashes($_POST['othersData']), true);
         if (!is_array($othersData)) {
             $othersData = array();
         }
         do_action("mainwp-site-sync-others-data", $othersData);
         if (isset($othersData['syncUpdraftData']) && $othersData['syncUpdraftData']) {
             if (MainWPChildUpdraftplusBackups::isActivatedUpdraftplus()) {
                 $information['syncUpdraftData'] = MainWPChildUpdraftplusBackups::Instance()->syncData();
             }
         }
         if (version_compare(phpversion(), '5.3', '>=')) {
             if (isset($othersData['syncBackUpWordPress']) && $othersData['syncBackUpWordPress']) {
                 if (MainWPChildBackUpWordPress::isActivated()) {
                     $information['syncBackUpWordPress'] = MainWPChildBackUpWordPress::Instance()->syncData();
                 }
             }
         }
         if (isset($othersData['syncWPRocketData']) && $othersData['syncWPRocketData'] == 'yes') {
             $data = array();
             if (MainWPChildWPRocket::isActivated()) {
                 $boxes = get_user_meta($GLOBALS['current_user']->ID, 'rocket_boxes', true);
                 $data['rocket_boxes'] = $boxes;
             }
             $information['syncWPRocketData'] = $data;
         }
     }
     $information['faviIcon'] = $this->get_favicon();
     $last_post = wp_get_recent_posts(array('numberposts' => absint('1')));
     if (isset($last_post[0])) {
         $last_post = $last_post[0];
     }
     if (isset($last_post) && isset($last_post['post_modified_gmt'])) {
         $information['last_post_gmt'] = strtotime($last_post['post_modified_gmt']);
     }
     $information['mainwpdir'] = MainWPHelper::validateMainWPDir() ? 1 : -1;
     $information['uniqueId'] = get_option('mainwp_child_uniqueId', '');
     if ($exit) {
         MainWPHelper::write($information);
     }
     return $information;
 }