Last active
December 16, 2015 10:49
-
-
Save Vinsanity/5422642 to your computer and use it in GitHub Desktop.
WordPress Widget bones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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