diff --git a/rounded-box-widget.php b/rounded-box-widget.php new file mode 100644 index 0000000..b6ac2a7 --- /dev/null +++ b/rounded-box-widget.php @@ -0,0 +1,76 @@ + 'roundedboxwidget', 'description' => 'Displays a rounded box with title and content' ); + $this->WP_Widget('roundedboxwidget', 'Rounded Box and Title', $widget_ops); + } + + function form($instance) + { + $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'content' => '' ) ); + + $title = $instance['title']; + $content = $instance['content']; +?> +

+ +

+ + + + +'.$content.'

'; + + echo $after_widget; + } + +} + +add_action( 'widgets_init', create_function('', 'return register_widget("roundedboxwidget");') ); + + +function rbw_scripts() { + wp_enqueue_style( "rbw_css", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/rbw-styles.css")); +} + +add_action('wp_enqueue_scripts', 'rbw_scripts'); + +?>