MainWP 3.4 Additions
Published on May 11, 2017 by Bogdan Rapaić in MainWP Blog under
Heads up: This page may include affiliate links. Read the full disclaimer.

MainWP Side Menu
The biggest user interface improvement in the MainWP Dashboard 3.4 is the MainWP Side Menu.

The Side Menu has 3 top level menus: MainWP Dashboard, MainWP Extensions, and Child Site.
- MainWP Dashboard menu allows you to quickly navigate through all MainWP Pages.
- MainWP Extensions menu shows all installed extensions and provides you the ability to quickly access any extension settings page.
- Child Sites menu lists all your child sites from where you can easily access any child site Individual Overview Page, Updates page for the Child site or the Edit page for the Child site.
If the Side Menu is enabled, MainWP Dashboard will automatically collapse the WordPress Admin menu.
It is important to know that using the MainWP Side Menu is 100% optional, you can disable it at any time on the MainWP > Settings > Dashboard Options page by setting the Show MainWP side menu option to No.

Last Sync Notification Format
This version also includes a small cosmetic update. You will notice that the Last Sync notification is displayed differently.

New MainWP Hooks (for developers)
Find all hooks and examples in the MainWP Codex
Hook: mainwp_before_save_sync_result
Type: Filter
Description: Executes before saving synced data to the MainWP Dashboard database.
Example:
add_filter( 'mainwp_before_save_sync_result', 'myhook_mainwp_before_save_sync_result', 10, 2 );
function myhook_mainwp_before_save_sync_result( $information, $pSite ) {
// do something with synced data of $pSite
return $information
}
Hook: mainwp_get_all_pages_data
Type: Filter
Description: Get pages from child sites order by the Post date instead of by the Publish date
Example:
add_filter( 'mainwp_get_all_pages_data', 'myhook_mainwp_get_all_pages_data', 10, 1 );
function myhook_mainwp_get_all_pages_data( $post_data ) {
$post_data['where_post_date'] = true; // get pages ordered by post date
return $post_data;
}
Hook: mainwp_get_all_posts_data
Type: Filter
Description: Get posts from child sites order by the Post date instead of by the Publish date
Example:
add_filter( 'mainwp_get_all_posts_data', 'myhook_mainwp_get_all_posts_data', 10, 1 );
function myhook_mainwp_get_all_posts_data( $post_data ) {
$post_data['where_post_date'] = true; // get posts ordered by post date
return $post_data;
}
Hook: mainwp_updatescheck_sendmail_at_time
Type: Filter
Description: Allows you to set specific time for sending MainWP Dashbaord notifications.
Example:
add_filter( 'mainwp_updatescheck_sendmail_at_time', 'myhook_mainwp_updatescheck_sendmail_at_time', 10, 1 );
function myhook_mainwp_get_all_posts_data( $hour ) {
$hour = '12:00'; // send email notifactions after 12:00
return $hour;
}
Hook: mainwp_website_updated
Type: Action
Description: Executes after the upate process.
Example:
add_action( 'mainwp_website_updated', 'myhook_mainwp_website_updated', 10, 3 );
function myhook_mainwp_website_updated( $pWebsite, $type, $list ) {
// do something
// $pWebsite data of the updated site
// $type type of update: Plugin, Theme of WordPress Core
// $list list of updated items
return true;
}
Hook: mainwp_added_new_site
Type: Action
Description: Executes after adding a new child site.
Example:
add_action( 'mainwp_added_new_site', 'myhook_mainwp_added_new_site', 10, 1 );
function myhook_mainwp_added_new_site( $site_id ) {
// do something with the site where site ID is $site_id
return true;
}
Hook: mainwp_update_site
Type: Action
Description: Executes after updating a site.
Example:
add_action( 'mainwp_update_site', 'myhook_mainwp_update_site', 10, 1 );
function myhook_mainwp_update_site( $site_id ) {
// do something with the site where site ID is $site_id
return true;
}
Hook: mainwp_delete_site
Type: Action
Description: Executes after deleting a site.
Example:
add_action( 'mainwp_delete_site', 'myhook_mainwp_delete_site', 10, 1 );
function myhook_mainwp_delete_site( $pWebsite ) {
// do something with the deleted site data
return true;
}
Full Changelog
Share
Manage Unlimited WordPress Sites from One Dashboard!
- Privacy-first, Open Source, Self-hosted
- Easy Client Management
- 15+ & 30 + Premium Add-ons
- Bulk Plugins & Themes Management
6 comments
Tim McNitt
The Last Sync Notification is also wonky. Immediately after syncing all websites is says they were last synced 7 hours ago.
Dennis Dornon
Sync time fixed in Dashboard version 3.4.1
Bogdan Rapaic
Appears to be a timezone issue. The timestamp is not rendering properly for your timezone. The dev team has been notified and the issue will be fixed as soon as possible.
Mads Bischoff
After upgrading, my menu is a mess (not looking nicely ad yours)
I understand the concept of the ‘submenu’, but it looks like there is a rendering problem??
It looks like everything that should be in the sub-menu, is listet in a long row. And then underneath, the pages I select, is show. This gives me a very long page….
Anyone having the same problem??
Bogdan Rapaic
Have you tried to hard-refresh your browser or to clear browser cache?
Luke Cavanagh
Solid new features and developer hooks.
Comments are closed.