[wp-trac] [WordPress Trac] #20189: Deprecate bloginfo() in favor of siteinfo()

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 7 00:15:20 UTC 2012


#20189: Deprecate bloginfo() in favor of siteinfo()
--------------------------+-------------------------
 Reporter:  benbalter     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.4
 Severity:  trivial       |  Resolution:  maybelater
 Keywords:                |
--------------------------+-------------------------
Changes (by nacin):

 * keywords:  2nd-opinion dev-feedback has-patch =>
 * status:  new => closed
 * resolution:   => maybelater
 * milestone:  Awaiting Review =>


Comment:

 The problem here is that 'site' means two different things in WordPress.
 One, it is a synonym for 'blog'. This is primarily prevalent in the UI —
 we don't use 'blog' anywhere, since 3.0. Anywhere on WordPress.org that
 uses 'blog' or 'weblog' should/will be converted to 'site' (sadly, many
 are out of date). At the API level, few particular functions use 'site' to
 refer to 'blog', but very few do. (See "Two," below.)

 Two, WordPress MU really, really complicated things here. (Screwed the
 pooch, if you will.) It used the word 'site' to mean a collection of
 blogs. It was reflected everywhere — get_site_option(),
 get_current_site(), etc. In 3.0 this caused quite a few problems (as that
 is when we renamed the UI).

 The solution wasn't great. A collection of 'blogs' is now a 'network'.
 Which means the UI now says a collection of 'sites' is a 'network'. The
 API is therefore consistent that 'blog' (say, blog_id) is always a blog-
 site, and that 'network' (say, populate_network()) is always a site-
 network. This of course leaves a number of situations where 'site' is
 ambiguous. site_id and current_site are both holdovers from MU and mean
 site-network. But ms_site_check() actually refers to a blog-site.

 Now that the merge is two years behind us, what we need to do is do a full
 accounting of all functions that use 'site' (as in site-network) as a name
 or argument, deprecate them, and move them to 'network' terminology. Only
 once we do that can we start to move 'blog' to 'site' in the API.

 And of course, with functions get_blog_option() (blog-site) and
 get_site_option() (site-network) already existing, it's not like
 get_blog_option() can be renamed to get_site_option(). It's just too
 messy.

 And so, we end up with the status quo — which is to leave everything as
 is, and hope it doesn't confuse people too much.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20189#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list