wp_dashboard()
Displays the dashboard.
Contents
Source
File: wp-admin/includes/dashboard.php
function wp_dashboard() { $screen = get_current_screen(); $columns = absint( $screen->get_columns() ); $columns_css = ''; if ( $columns ) { $columns_css = " columns-$columns"; } ?> <div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>"> <div id="postbox-container-1" class="postbox-container"> <?php do_meta_boxes( $screen->id, 'normal', '' ); ?> </div> <div id="postbox-container-2" class="postbox-container"> <?php do_meta_boxes( $screen->id, 'side', '' ); ?> </div> <div id="postbox-container-3" class="postbox-container"> <?php do_meta_boxes( $screen->id, 'column3', '' ); ?> </div> <div id="postbox-container-4" class="postbox-container"> <?php do_meta_boxes( $screen->id, 'column4', '' ); ?> </div> </div> <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); }
Expand full source code Collapse full source code View on Trac View on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Need to make a custom dashboard for your custom plugin?
The following code will create a fully functional dashboard that can be rearranged by the user. Once the user rearranges it, the order of the widgets for that dashboard are saved in the user’s settings.
Expand full source codeCollapse full source code