Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_blog_list [ WordPress Function ]

get_blog_list ( $start = 0, $num = 10, $deprecated = '' )
Defined at:



No description yet.

Source


<?php
function get_blog_list$start 0$num 10$deprecated '' ) {
    
_deprecated_function__FUNCTION__'3.0' );

    global 
$wpdb;
    
$blogs $wpdb->get_results$wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC"$wpdb->siteid), ARRAY_A );

    foreach ( (array) 
$blogs as $details ) {
        
$blog_list$details['blog_id'] ] = $details;
        
$blog_list$details['blog_id'] ]['postcount'] = $wpdb->get_var"SELECT COUNT(ID) FROM " $wpdb->get_blog_prefix$details['blog_id'] ). "posts WHERE post_status='publish' AND post_type='post'" );
    }
    unset( 
$blogs );
    
$blogs $blog_list;

    if ( 
false == is_array$blogs ) )
        return array();

    if ( 
$num == 'all' )
        return 
array_slice$blogs$startcount$blogs ) );
    else
        return 
array_slice$blogs$start$num );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics