[wp-trac] [WordPress Trac] #12993: 'get_current_blog()' and/or 'current_blog_id()' function?

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 14 08:33:31 UTC 2010


#12993: 'get_current_blog()' and/or 'current_blog_id()' function?
-----------------------------+----------------------------------------------
 Reporter:  martythornley    |       Owner:                       
     Type:  feature request  |      Status:  new                  
 Priority:  normal           |   Milestone:  3.0                  
Component:  General          |     Version:  3.0                  
 Severity:  normal           |    Keywords:  current blog, blog id
-----------------------------+----------------------------------------------
 I posted this over in the mu forums but realize it is pretty dead over
 there and may be better mentioned here:

 http://mu.wordpress.org/forums/topic/17568?replies=2

 It would be a great help to easily get the current blog's id as in
 'current_blog_id()'. I searched the entire wordpress 3.0 and mu code and
 it is not mentioned anywhere.

 'get_current_blog()' might imply something more complex that returns all a
 blog's info, which would be nice too.

 But in the short term... 'current_blog_id()'?

 People are currently having to call global variables to use $wpdb,
 $current_site and/or $blog_id. I feel all of these are messy and pretty
 generic variables to be using within theme or plugin files.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12993>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list