Posted on

MainWP 3.4 Additions

MainWP 3.0

MainWP Side Menu

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

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.

MainWP Last Sync

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

MainWP Dashboard MainWP Child

Get MainWP News and Notifications

Bogdan Rapaic on FacebookBogdan Rapaic on Twitter
Bogdan Rapaic
Lead Designer and Support at MainWP

6 thoughts on “MainWP 3.4 Additions

  1. Solid new features and developer hooks.

  2. 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??

    1. Have you tried to hard-refresh your browser or to clear browser cache?

  3. The Last Sync Notification is also wonky. Immediately after syncing all websites is says they were last synced 7 hours ago.

    1. 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.

    2. Sync time fixed in Dashboard version 3.4.1

Comments are closed.

This is an older post so comments are closed.
You can continue the discussion in the MainWP User Group.