=')) { 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_activity_feed_activation_check'); function get_sfc_activity_feed($args) { $args = wp_parse_args($args, array( 'header'=>'true', 'site'=>'', 'bordercolor'=>'000000', 'width'=>'260', 'height'=>'400', 'font'=>'lucida+grande', 'colorscheme'=>'light')); extract($args); if (empty($site)) $site = get_bloginfo('url'); return "
"; } function sfc_activity_feed($args='') { echo get_sfc_activity_feed($args); } function sfc_activity_feed_shortcode($atts) { $args = shortcode_atts(array( 'header'=>'true', 'site'=>'', 'bordercolor'=>'000000', 'width'=>'260', 'height'=>'400', 'font'=>'lucida+grande', 'colorscheme'=>'light'), $atts); return get_sfc_activity_feed($args); } add_shortcode('fb-activity', 'sfc_activity_feed_shortcode'); class SFC_Activity_Feed_Widget extends WP_Widget { function SFC_Activity_Feed_Widget() { $widget_ops = array('classname' => 'widget_sfc-activity-feed', 'description' => 'Facebook Activity Feed'); $this->WP_Widget('sfc-activity', 'Facebook Activity Feed (SFC)', $widget_ops); } function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); $instance['width'] = intval($instance['width']); $instance['height'] = intval($instance['height']); ?> '', 'width'=>260, 'height'=>400) ); $instance['title'] = strip_tags($new_instance['title']); $instance['width'] = intval($new_instance['width']); $instance['height'] = intval($new_instance['height']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'width'=>260, 'height'=>400) ); $title = strip_tags($instance['title']); $width = intval($instance['width']); $height = intval($instance['height']); ?>