Skip to content

Instantly share code, notes, and snippets.

@jbreitenbucher
Created March 7, 2012 22:47
Show Gist options
  • Save jbreitenbucher/1996837 to your computer and use it in GitHub Desktop.
Save jbreitenbucher/1996837 to your computer and use it in GitHub Desktop.
WordPress: Widget Boilerplate
class JB-__Class Name__ extends WP_Widget {
function __construct()
{
$params = array(
'description' => '',
'name' => ''
);
parent::__contruct('','',$params);
}
public function form()
{
}
public function widget()
{
}
}
add_action('widgets_init','jb_register_widget');
function jb_register_widget()
{
register_widget('__Class Name__');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment