- Timestamp:
- Oct 7, 2011, 8:59:37 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.4/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r688 r792 891 891 } 892 892 893 function xpress_grobal_recent_posts($num = 10,$ post_list='')893 function xpress_grobal_recent_posts($num = 10,$exclusion_blog = 0, $shown_for_each_blog = false) 894 894 { 895 895 global $wpdb, $wp_rewrite , $switched , $blog_id; 896 896 if (empty($date_format)) $date_format = get_settings('date_format'); 897 897 if (empty($time_format)) $time_format = get_settings('time_format'); 898 $exclusion = explode(',' , $exclusion_blog); 899 898 900 899 901 $first_blogid = $blog_id; … … 904 906 $blogs = get_blog_list(0,'all'); 905 907 foreach ($blogs AS $blog) { 908 if (!in_array(0, $exclusion) && in_array($blog['blog_id'], $exclusion)) continue; 906 909 switch_to_blog($blog['blog_id']); 907 910 $wp_rewrite->init(); // http://core.trac.wordpress.org/ticket/12040 is solved, it is unnecessary. … … 922 925 ob_end_clean(); 923 926 924 $data->b rog_id = $blog['blog_id'];927 $data->blog_id = $blog['blog_id']; 925 928 $data->blog_name = get_bloginfo('name'); 926 929 $data->blog_url = get_bloginfo('url'); … … 995 998 996 999 $data->post_views = xpress_post_views_count('post_id=' . $data->post_id . '&blogid=' . $data->brog_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0'); 1000 if (function_exists('the_qf_get_thumb_one')){ 1001 $data->post_thumbnail = the_qf_get_thumb_one("num=0&width=120&tag=1","",$data->the_full_content); 1002 } else { 1003 $data->post_thumbnail = get_the_post_thumbnail(null,'thumbnail'); 1004 } 1005 $data->author_avatar =get_avatar(get_the_author_meta('ID'),$size = '32'); 997 1006 998 1007 $data_array[] = $data; … … 1006 1015 1007 1016 restore_current_blog(); 1017 } 1018 if (!$shown_for_each_blog){ 1008 1019 usort($data_array, "the_time_cmp"); 1009 } 1010 1011 if (!empty($num)){ 1012 $data_array = array_slice($data_array,0,$num); 1020 if (!empty($num)){ 1021 $data_array = array_slice($data_array,0,$num); 1022 } 1013 1023 } 1014 1024 return $data_array;
Note: See TracChangeset
for help on using the changeset viewer.