get_most_active_blogs [ WordPress Functions ]
get_most_active_blogs ( $num = 10, $display = true )
| Defined at: |
|
| Codex |
Similar Functions: get_active_blog_for_user, get_post_time, get_post_class, get_post_field, get_post_type_labels
No description yet.
Source
function get_most_active_blogs( $num = 10, $display = true ) {
_deprecated_function( __FUNCTION__, '3.0' );
$blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details
if ( is_array( $blogs ) ) {
reset( $blogs );
foreach ( (array) $blogs as $key => $details ) {
$most_active[ $details['blog_id'] ] = $details['postcount'];
$blog_list[ $details['blog_id'] ] = $details; // array_slice() removes keys!!
}
arsort( $most_active );
reset( $most_active );
foreach ( (array) $most_active as $key => $details )
$t[ $key ] = $blog_list[ $key ];
unset( $most_active );
$most_active = $t;
}
if ( $display == true ) {
if ( is_array( $most_active ) ) {
reset( $most_active );
foreach ( (array) $most_active as $key => $details ) {
$url = esc_url('http://' . $details['domain'] . $details['path']);
echo '<li>' . $details['postcount'] . " <a href='$url'>$url</a></li>";
}
}
}
return array_slice( $most_active, 0, $num );
}Examples [ wp-snippets.com ]
Top Google Search Results
- WPMU Functions/get most active blogs « WordPress Codex
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions.
codex.wordpress.org - #13773 (Warning and wrong blog prefix in get_most_active_blogs ...
In get_blog_list() and get_most_active_blogs() you get a warning: Notice: Undefined index: time in \wp-includes\ms-blogs.php on line 548. The reason is ...
core.trac.wordpress.org - get_last_updated() and get_most_active_blogs() returns 1 everytime ...
Hello, WPMU 2.7 I'm trying to iterate through a list on my home page so I can display recent posts. I have two blogs on my system. If I call ...
premium.wpmudev.org - PHPXRef 0.7.1 : Documentation Wordpress : Full Function Index
Function List (alphabetical). Total unique function names: 4871. Functions defined on the site: 4430; PHP functions used on the site: 441. Functions defined on ...
doc-wordpress.com
