'fblikebox_widget', 'description' => esc_html__( 'Facebook widget.', 'nanopress') ); parent::__construct('nanopress_fb_likebox_widget', esc_html__('jellywp: Facebook widget', 'nanopress'), $widget_ops); } /*-----------------------------------------------------------------------------------*/ /* Display Widget /*-----------------------------------------------------------------------------------*/ function widget($args,$instance){ extract($args); $title = $instance['title']; $page_url = $instance['page_url']; $lang = $instance['lang']; $theme_color = $instance['theme_color']; $show_faces = isset($instance['show_faces']) ? 'true' : 'false'; $stream = isset($instance['stream']) ? 'true' : 'false'; $header = isset($instance['header']) ? 'true' : 'false'; echo'
'; ?>
data-stream="" data-header="">
"; } /*-----------------------------------------------------------------------------------*/ /* Update Widget /*-----------------------------------------------------------------------------------*/ function update($new_instance, $old_instance){ $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['page_url'] = $new_instance['page_url']; $instance['lang'] = $new_instance['lang']; $instance['theme_color'] = $new_instance['theme_color']; $instance['show_faces'] = $new_instance['show_faces']; $instance['stream'] = $new_instance['stream']; $instance['header'] = $new_instance['header']; return $instance; } /*-----------------------------------------------------------------------------------*/ /* Widget Settings (Displays the widget settings controls on the widget panel) /*-----------------------------------------------------------------------------------*/ function form($instance){ ?> esc_html__( 'Facebook', 'nanopress'), 'page_url' => 'https://www.facebook.com/envato', 'lang' => 'en_US', 'theme_color' => 'light', 'show_faces' => 'on', 'stream' => null, 'header' => 'on' ); $instance = wp_parse_args((array) $instance, $defaults); ?>

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

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

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