Skip to content

Instantly share code, notes, and snippets.

@verteb
Created March 21, 2012 17:40
Show Gist options
  • Select an option

  • Save verteb/2150010 to your computer and use it in GitHub Desktop.

Select an option

Save verteb/2150010 to your computer and use it in GitHub Desktop.
Wordpress: Widget
class FacebookFeed extends WP_Widget {
function facebookFeed()
{
parent::WP_Widget(false, $name = 'facebookFeed', array("description" => 'Affiche le fil d\'actualités facebook'));
}
function widget($args, $instance)
{
}
function update($new_instance, $old_instance)
{
// Modification des paramètres du widget
}
function form($instance)
{
// Affichage des paramètres du widget dans l'admin
}
}
add_action('widgets_init', create_function('', 'return register_widget("FacebookFeed");'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment