WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Creating Widgets for Multi Site Network Dashboard (5 posts)

  1. stophub
    Member
    Posted 2 years ago #

    Hi,

    Does anyone know how to create a widget for the network dashboard - not the subsites? I tried:

    wp_add_dashboard_widget( 'dc_network_dashboard_my_function', 'My Function Caller', 'dc_wp_network_dashboard_my_function' );

    but it doesn't show. I tried diving into the /wp-admin/includes/dashboard.php file, but it doesn't give a clear picture of what to do for network-dashboard activation.

  2. Curtiss Grymala
    Member
    Posted 2 years ago #

    What action are you hooking into?

    In order to add the widget to the Network dashboard, you need to hook into the wp_network_dashboard_setup action.

  3. stophub
    Member
    Posted 2 years ago #

    Thanks - i tried searching for wp_network_dashboard_setup across the interwebs - but it turns out it seem to be a rather hidden action.

    Do you have any examples of its use? My goal is to create a widget for the network dashboard to show server status.

  4. Curtiss Grymala
    Member
    Posted 2 years ago #

    It's identical to the wp_dashboard_setup action, except that it is fired in Network Admin instead of Site Admin.

  5. stophub
    Member
    Posted 2 years ago #

    Thanks a bunch !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.