Return to Snippet

Revision: 971
at August 24, 2006 01:29 by yuconner


Initial Code
function widget_myuniquewidget($args) {

    extract($args);
?>
        <?php echo $before_widget; ?>
            <?php echo $before_title
                . 'My Unique Widget'
                . $after_title; ?>
            Hello, World!
        <?php echo $after_widget; ?>
<?php

}

register_sidebar_widget( 'My Unique Widget', 'widget_myuniquewidget' );

Initial URL
http://automattic.com/code/widgets/plugins/

Initial Description
put "register_sidebar_widget(..)" into "function widgets_init()"

Initial Title
Example code wordpress widget

Initial Tags
wordpress

Initial Language
PHP