=')) { 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_chicklet_activation_check'); function sfc_chicklet($id = 0) { $options = get_option('sfc_options'); if ($id == 0) { if ($options['fanpage']) $id = $options['fanpage']; else $id = $options['appid']; } $sfc_chicklet_fancount = get_transient('sfc_chicklet_fancount'); if (!isset($sfc_chicklet_fancount[$id])) { include_once 'facebook-platform/facebook.php'; $fb=new Facebook($options['api_key'], $options['app_secret']); $result = $fb->api_client->fql_query("SELECT fan_count, page_url FROM page WHERE page_id={$id}"); if ($result) { $sfc_chicklet_fancount[$id] = $result[0]; set_transient('sfc_chicklet_fancount',$sfc_chicklet_fancount,SFC_FANCOUNT_CACHE); } } if ($sfc_chicklet_fancount) { $fancount = $sfc_chicklet_fancount[$id]['fan_count']; $pageurl = $sfc_chicklet_fancount[$id]['page_url']; } global $sfc_chicklet_no_style; if (!$sfc_chicklet_no_style) { ?>

Fans

ON FACEBOOK
'widget_sfc-chicklet', 'description' => 'Facebook Chicklet' ); $this->WP_Widget('sfc-chicklet', 'Facebook Chicklet', $widget_ops); } function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); ?>