Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class MyNewWidget extends WP_Widget {
function __construct() {
// Instantiate the parent object
parent::__construct('mynewwidgetbaseid, 'My New Widget Title');
function widget($args, $instance) {
// Widget output
function update($new_instance, $old_instance) {
// Save widget options
function form($instance) {
// Output admin widget options form
function myplugin_register_widgets() {
add_action('widgets_init', 'myplugin_register_widgets');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment