Home

If you are familiar enough with WordPress, you should know that they are ever emerging, introducing new features and having new cool stuffs every now and then.

WordPress 2.7 is a big leap from previous version, with a revamped administration panel altogether. One cool thing that’s impressive is about the widgets on admin dashboard.

This is a rather great news for plugin developers, as it allows plugins to have more exposure to the user, at the same time allowing the user the flexibility to deactivate dashboard widgets. What’s more, it can be drag-and-dropped for widget rearrangement!

Registering your widget onto dashboard is easy.

// Your Dashboard Widget Content
function dashboard_widget_hello_world() {
echo ‘Hello World :) ’;
}

// Add Dashboard Widget using wp_add_dashboard_widget() function
function dashboard_widget_hello_world_setup() {
wp_add_dashboard_widget( ‘dashboard_widget_hello_world’, __( ‘Hello World’ ), ‘dashboard_widget_hello_world’ );
}

// Register Dashboard Widget to WordPress
add_action(‘wp_dashboard_setup’, ‘dashboard_widget_hello_world_setup’);

The above code basically registers a dashboard widget called “Hello World” which contains “Hello World :) ” in the widget.

This feature is powerful, as in you may connect to database to retrieve any relevant data, or makes use of WordPress shortcodes to call functions. It is up to your imagination on how far you want to go!

For more information, as usual, please refer to WordPress Codex here

Have fun! :)

Related Posts with Thumbnails
BOOKMARK
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Live
  • Spurl
  • StumbleUpon
  • TwitThis
  • YahooMyWeb

SPEAK / ADD YOUR COMMENT

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top

*Details

Sideblog


  • [01/28/2010]

    Apple has just announced their latest product - iPad (a new product category in between iPod Touch and Mac computer), starting at USD$499 - http://www.apple.com/ipad/

  • [12/09/2009]

    New SG iPhone plans released, from 2 carriers - http://bit.ly/5xzZ0I (M1) http://bit.ly/7f41zc (Starhub) - apparently M1 has the better deal, with 10GB & unlimited data bundle! woot!

  • [06/11/2009]

    WordPress "Baker" 2.8 released. Faster, redesigned theme management, new widget interface, and new Screen Options on every page. Find out more

  • My Wall


    Latest on Wed, 12:04

    d0rr: wth, my listing styles are not appearing, anyone can help to spot where the problem is??

    d0rr: larger font size, wider content area - does little changes make difference?

    d0rr: hey yuan, nice to see u here before u sleep :P

    TCY: hor hor hor Is time to sleep ~~~~~~~

    real rape footage: mm.. strange :)

    » Say something!



    *Who, adorr?

    I am a self-taught photographer who earns a living as web developer. I am a Technology Engineer, in which am professionally concerned with developing economical and safe solutions to practical problems. And if you are expecting the magical mixture between science and arts, you found me.



    • ??? ? ????
    • USA Road Trip 2009/10
    • W3 Silver Awards
    • Red Lanterns
    • Blossom
    • Cheng Ho Marine
    • Flight @ Dawn
    • Full Moon
    • Arial, 17px
    • Home-cooked, With Love
    • Pepper Lunch
    • Happy Birthday, Singapore
    • Lilo the Steeeetch
    • Hunny the Pooooooh