'facebook_like', 'description' => 'Adds support for Facebook Like Box.'); $control_ops = array('width'=>300, 'height'=>300); $this->__construct('facebook-like-widget', 'Aadi Facebook Like Box', $widget_ops, $control_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 = '240'; } if($show_stream == 'true') { $height = '515'; } if($show_stream == 'true' && $show_faces == 'true' && $show_header == 'true') { $height = '540'; } if($show_stream == 'true' && $show_faces == 'true' && $show_header == 'false') { $height = '540'; } if($show_header == 'true') { $height = $height + 30; } echo $before_widget; if($title) { echo $before_title.$title.$after_title; } if($page_url): ?>
'Find us on Facebook', 'page_url' => '', 'width' => '268', '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'); ?>" />