=')) { return; } } deactivate_plugins(basename(__FILE__)); // Deactivate ourself wp_die("The base SFC plugin must be activated before this plugin will run."); } register_activation_hook(__FILE__, 'sfc_connect_widget_activation_check'); // Shortcode for putting it into pages or posts directly // profile id is required. Won't work without it. function sfc_connect_shortcode() { $login ='Connect with Facebook'; return $login; } add_shortcode('fb-connect', 'sfc_connect_shortcode'); class SFC_Connect_Widget extends WP_Widget { function SFC_Connect_Widget() { $widget_ops = array('classname' => 'widget_sfc-connect', 'description' => 'Facebook Connect'); $this->WP_Widget('sfc-connect', 'Facebook Connect (SFC)', $widget_ops); } function widget($args, $instance) { $options = get_option('sfc_options'); extract( $args ); $title = apply_filters('widget_title', $instance['title']); $appid = $options['appid']; $stream = isset($instance['stream']) ? $instance['stream'] : true; $connections = intval($instance['connections']); $width = intval($instance['width']); ?> '') ); $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = strip_tags($instance['title']); ?>