=')) { 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_find_widget_activation_check'); // Shortcode for putting it into pages or posts directly // profile id is required. Wont work without it. function sfc_find_shortcode() { $options = get_option('sfc_options'); if ($options['fanpage']) $fb_id = $options['fanpage']; else $fb_id = $options['appid']; return ''; } add_shortcode('fb-find', 'sfc_find_shortcode'); class SFC_Find_Widget extends WP_Widget { function SFC_Find_Widget() { $widget_ops = array('classname' => 'widget_sfc-find', 'description' => 'Find us on Facebook Button'); $this->WP_Widget('sfc-find', 'Facebook Find Button (SFC)', $widget_ops); } function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); ?> '') ); $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']); ?>