public static function renderDashboard(&$website, &$page) { if (!mainwp_current_user_can("dashboard", "access_individual_dashboard")) { mainwp_do_not_have_permissions("individual dashboard"); return; } ?> <div id="howto-metaboxes-general" class="wrap"> <?php if ($website->mainwpdir == -1) { echo '<div class="mainwp_info-box-yellow"><span class="mainwp_conflict" siteid="' . $website->id . '"><strong>Configuration issue detected</strong>: MainWP has no write privileges to the uploads directory. Because of this some of the functionality might not work, please check <a href="http://docs.mainwp.com/install-or-update-of-a-plugin-fails-on-managed-site/" target="_blank">this FAQ for further information</a></span></div>'; } $userExtension = MainWPDB::Instance()->getUserExtension(); $ignoredPluginConflicts = json_decode($website->ignored_pluginConflicts, true); if (!is_array($ignoredPluginConflicts)) { $ignoredPluginConflicts = array(); } $globalIgnoredPluginConflicts = json_decode($userExtension->ignored_pluginConflicts, true); if (!is_array($globalIgnoredPluginConflicts)) { $globalIgnoredPluginConflicts = array(); } $ignoredThemeConflicts = json_decode($website->ignored_themeConflicts, true); if (!is_array($ignoredThemeConflicts)) { $ignoredThemeConflicts = array(); } $globalIgnoredThemeConflicts = json_decode($userExtension->ignored_themeConflicts, true); if (!is_array($globalIgnoredThemeConflicts)) { $globalIgnoredThemeConflicts = array(); } $pluginConflicts = json_decode($website->pluginConflicts, true); $themeConflicts = json_decode($website->themeConflicts, true); $savedPluginConflicts = get_option('mainwp_pluginConflicts'); $savedThemeConflicts = get_option('mainwp_themeConflicts'); $startShown = false; $found = false; if (count($pluginConflicts) > 0) { foreach ($pluginConflicts as $pluginConflict) { if (in_array($pluginConflict, $ignoredPluginConflicts) || in_array($pluginConflict, $globalIgnoredPluginConflicts)) { continue; } if (!$startShown) { echo '<div class="mainwp_info-box-yellow">'; $startShown = true; } if (!$found) { $found = true; } else { echo '<br />'; } echo '<span class="mainwp_conflict" siteid="' . $website->id . '" plugin="' . urlencode($pluginConflict) . '"><strong>Conflict Plugin Detected</strong>: MainWP has found "' . $pluginConflict . '" installed on this site, please check <a href="' . $savedPluginConflicts[$pluginConflict] . '">this FAQ for further information</a> - <strong><a href="#" class="mainwp_conflict_ignore">Ignore</a></strong> - <strong><a href="#" class="mainwp_conflict_ignore_globally">Ignore Globally</a></strong></span>'; } } if (count($themeConflicts) > 0) { foreach ($themeConflicts as $themeConflict) { if (in_array($themeConflict, $ignoredThemeConflicts) || in_array($themeConflict, $globalIgnoredThemeConflicts)) { continue; } if (!$startShown) { echo '<div class="mainwp_info-box-yellow">'; $startShown = true; } if (!$found) { $found = true; } else { echo '<br />'; } echo '<span class="mainwp_conflict" siteid="' . $website->id . '" theme="' . urlencode($themeConflict) . '"><strong>Conflict Theme Detected</strong>: MainWP has found "' . $themeConflict . '" installed on this site, please check <a href="' . $savedThemeConflicts[$themeConflict] . '">this FAQ for further information</a> - <strong><a href="#" class="mainwp_conflict_ignore">Ignore</a></strong> - <strong><a href="#" class="mainwp_conflict_ignore_globally">Ignore Globally</a></strong></span>'; } } if ($startShown) { echo '</div>'; } global $screen_layout_columns; MainWPMain::renderDashboardBody(array($website), $page, $screen_layout_columns); ?> </div> <?php }