Subdomain Posts
PHP | 423 days ago
None | 710 days ago
Apache Log | 710 days ago
Recent Posts
None | 32 sec ago
None | 35 sec ago
None | 1 min ago
None | 1 min ago
Java | 1 min ago
C++ | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Jeremy Clarke on the 23rd of Jan 2009 01:55:49 AM
Download |
Raw |
Embed |
Report
function example_add_dashboard_widgets() {
wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');
// Globalize the metaboxes array, this holds all the widgets for wp-admin
global $wp_meta_boxes;
// Get the array for your widget from $wp_metaboxes and manually add it to the 'sorted' portion
// This pre-empts the sorting system to make sure you are at the top
// CAVEAT: your widget is no longer sortable. it will always be at the top.
$example_widget = $wp_meta_boxes['dashboard']['normal']['core']['example_dashboard_widget'];
$wp_meta_boxes['dashboard']['normal']['sorted']['example_dashboard_widget'] = $example_widget_backup;
}
Submit a correction or amendment below.
Make A New Post