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...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Jeremy Clarke on the 23rd of Jan 2009 01:55:49 AM Download | Raw | Embed | Report
  1. function example_add_dashboard_widgets() {
  2.         wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');
  3.        
  4.         // Globalize the metaboxes array, this holds all the widgets for wp-admin
  5.         global $wp_meta_boxes;
  6.  
  7.         // Get the array for your widget from $wp_metaboxes and manually add it to the 'sorted' portion
  8.         // This pre-empts the sorting system to make sure you are at the top
  9.         // CAVEAT: your widget is no longer sortable. it will always be at the top.    
  10.         $example_widget = $wp_meta_boxes['dashboard']['normal']['core']['example_dashboard_widget'];
  11.         $wp_meta_boxes['dashboard']['normal']['sorted']['example_dashboard_widget'] = $example_widget_backup;          
  12. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: