function Get_like_count($post) { $user_ID = self::Get_user_ID($post); if ($user_ID && !self::Is_excluded($post) && !WPAL2Int::social_in_excerpt($user_ID)) { $link_id = get_post_meta($post->ID, c_al2fb_meta_link_id, true); $fb_likes = WPAL2Int::Get_comments_or_likes($post, true); if ($fb_likes && $fb_likes->data && count($fb_likes->data) > 0) { return '<div class="al2fb_like_count"><a href="' . WPAL2Int::Get_fb_permalink($link_id) . '" rel="nofollow">' . count($fb_likes->data) . ' ' . _n('liked this post', 'liked this post', count($fb_likes->data), c_al2fb_text_domain) . '</a></div>'; } } return ''; }
static function Get_activity_feed($post) { // Get data $user_ID = WPAL2Facebook::Get_user_ID($post); if ($user_ID && !WPAL2Facebook::Is_excluded_post_type($post) && !WPAL2Int::social_in_excerpt($user_ID)) { // Get options $domain = $_SERVER['HTTP_HOST']; $width = get_user_meta($user_ID, c_al2fb_meta_act_width, true); $height = get_user_meta($user_ID, c_al2fb_meta_act_height, true); $header = get_user_meta($user_ID, c_al2fb_meta_act_header, true); $colorscheme = get_user_meta($user_ID, c_al2fb_meta_like_colorscheme, true); $font = get_user_meta($user_ID, c_al2fb_meta_like_font, true); $border = get_user_meta($user_ID, c_al2fb_meta_like_box_border, true); $recommend = get_user_meta($user_ID, c_al2fb_meta_act_recommend, true); // Build content $content = '<div class="al2fb_activity_feed">'; $content .= '<div id="fb-root"></div>'; $content .= WPAL2Int::Get_fb_script($user_ID); $content .= '<fb:activity'; $content .= ' site="' . $domain . '"'; $content .= ' width="' . (empty($width) ? '300' : $width) . '"'; $content .= ' height="' . (empty($height) ? '300' : $height) . '"'; $content .= ' colorscheme="' . (empty($colorscheme) ? 'light' : $colorscheme) . '"'; $content .= ' header="' . ($header ? 'true' : 'false') . '"'; $content .= ' font="' . (empty($font) ? 'arial' : $font) . '"'; $content .= ' border_color="' . (empty($border) ? '' : $border) . '"'; $content .= ' recommendations="' . ($recommend ? 'true' : 'false') . '">'; $content .= '</fb:activity>'; $content .= '</div>'; return $content; } return ''; }