Skip to content
Commits on Source (1)
......@@ -138,7 +138,7 @@ function ai_activity_get_latest_posts($offset, $limit) {
return $results;
}
function ai_activity_display_recent_posts($tmp_number, $tmp_title_characters, $tmp_content_characters, $tmp_title_link = 'no', $tmp_show_avatars = 'yes', $tmp_avatar_size = 16, $posttype = 'post', $read_more = '', $read_more_link = false, $show_blog = false, $output = true) {
function ai_activity_display_recent_posts($tmp_number, $tmp_title_characters, $tmp_content_characters, $tmp_title_link = 'no', $tmp_show_avatars = 'yes', $tmp_avatar_size = 16, $posttype = 'post', $show_blog = false, $output = true) {
$html = '';
$posts = ai_activity_get_latest_posts($tmp_number * ai_activity_get_current_page(), $tmp_number);
......@@ -169,15 +169,6 @@ function ai_activity_display_recent_posts($tmp_number, $tmp_title_characters, $t
if ($show_blog) {
$blog_details = get_blog_details($blog_id);
$site_url = get_site_url($blog_id);
$class = 'blog-info';
$post_blog = "<span class=\"{$class}\">
<a href=\"{$site_url}\">{$blog_details->blogname}</a>
</span>";
$post_blog = apply_filters('recent_network_posts_post_blog',
$post_blog,
$blog_id);
$html .= " (<a href=\"{$site_url}\">{$blog_details->blogname}</a>)";
}
$html .= "</div>";
......@@ -219,12 +210,10 @@ function ai_activity_display_recent_posts_shortcode($attrs) {
'show_avatars' => 'no',
'avatar_size' => 16,
'posttype' => 'post',
'read_more' => '',
'read_more_link' => false,
'show_blog' => false
'show_blog' => true
), $attrs));
return ai_activity_display_recent_posts($number, $title_characters, $content_characters, $title_link, $show_avatars, $avatar_size, $posttype, $read_more, $read_more_link, $show_blog, false);
return ai_activity_display_recent_posts($number, $title_characters, $content_characters, $title_link, $show_avatars, $avatar_size, $posttype, $show_blog, false);
}
add_action('publish_post', 'ai_activity_publish_post');
......