Created
January 8, 2015 17:52
-
-
Save jessepearson/c2e8bc73c2aa71f2f202 to your computer and use it in GitHub Desktop.
Example from WordPress Codex for the Widget API with CSS classes
This file contains 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
<?php | |
/** | |
* Register widget with WordPress. | |
*/ | |
function __construct() { | |
parent::__construct( | |
'foo_widget', // Base ID | |
__( 'Widget Title', 'text_domain' ), // Name | |
array( | |
'classname' => 'YOUR WIDGET CLASSES', | |
'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