'facebook_like', 'description' => __('Add Facebook Like Box.','mythemeshop')); $control_ops = array('id_base' => 'facebook-like-widget'); parent::__construct('facebook-like-widget', __('MyThemeShop: FB Like Box','mythemeshop'), $widget_ops, $control_ops); } */ class Facebook_Like_Widget extends WP_Widget { public function __construct() { $widget_ops = array( 'classname' => 'facebook_like_widget', 'description' => __('Display a Facebook Like Box.', 'your-text-domain') ); parent::__construct('facebook_like_widget', __('Facebook Like Widget', 'your-text-domain'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $page_url = $instance['page_url']; $width = $instance['width']; $color_scheme = $instance['color_scheme']; $show_faces = isset($instance['show_faces']) ? 'true' : 'false'; $show_stream = isset($instance['show_stream']) ? 'true' : 'false'; $show_header = isset($instance['show_header']) ? 'true' : 'false'; $height = '65'; if($show_faces == 'true') { $height = '238'; } if($show_stream == 'true') { $height = '600'; } if($show_header == 'true') { $height = '600'; } echo $before_widget; if($title) { echo $before_title.$title.$after_title; } if($page_url): ?> __('Find us on Facebook','mythemeshop'), 'page_url' => '', 'width' => '292', 'color_scheme' => 'light', 'show_faces' => 'on', 'show_stream' => false, 'show_header' => false); $instance = wp_parse_args((array) $instance, $defaults); ?>

id="get_field_id('show_faces'); ?>" name="get_field_name('show_faces'); ?>" />

id="get_field_id('show_stream'); ?>" name="get_field_name('show_stream'); ?>" />

id="get_field_id('show_header'); ?>" name="get_field_name('show_header'); ?>" />