• I see in the codex that get_blog_list has been marked as depriciated, however i do not see a replacement for it… can anyone point me in the right direction?

Viewing 5 replies - 1 through 5 (of 5 total)
  • There aren’t any replacements (see the bottom of http://codex.ww.wp.xz.cn/WPMU_Functions/get_blog_list).

    If I recall correctly, this function was deprecated because of concern that it’ll crash a server if used incorrectly. It’s pretty resource intensive.

    Thread Starter security_man

    (@security_man)

    hmmm… any way to get a dynamic list of the blogs in a mu install of 3.0.1?

    Roll your own is the only way. But use caution.

    You’ll likely want to query against the wp_blogs table. So something like:

    global $wpdb;
    
    $sites = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_blogs ORDER BY blog_id" ) );

    Again, depending on the number of sites you have, this can be resource intense. I wouldn’t use it in a production environment.

    They are working on a replacement. You can still use the depricated function on smaller sites / if you know what you’re doing.

    Hey Andrea, your comment is reassuring.
    Good work!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘replacement for get_blog_list?’ is closed to new replies.