Skip to content

Instantly share code, notes, and snippets.

@Vinsanity
Last active December 16, 2015 10:49
Show Gist options
  • Save Vinsanity/5422642 to your computer and use it in GitHub Desktop.
Save Vinsanity/5422642 to your computer and use it in GitHub Desktop.
WordPress Widget bones
class myWidget extends WP_Widget{
function __construct()
{
= array(
'description' => 'Description goes here',
'name' => 'Widget name goes here'
);
parent::__construct('myWidget', '', );
}
public function form()
{
}
public function widget()
{
}
}
add_action('widgets_init', 'vl_register_myWidget');
function vl_register_myWidget()
{
register_widget('myWidget');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment