Skip to content

Instantly share code, notes, and snippets.

@jessepearson
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save jessepearson/814c5bb4276b2bd53bf5 to your computer and use it in GitHub Desktop.

Select an option

Save jessepearson/814c5bb4276b2bd53bf5 to your computer and use it in GitHub Desktop.
Example from WordPress Codex for the Widget API
<?php
/**
* Register widget with WordPress.
*/
function __construct() {
parent::__construct(
'foo_widget', // Base ID
__( 'Widget Title', 'text_domain' ), // Name
array( 'description' => __( 'A Foo Widget', 'text_domain' ), ) // Args
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment