WordPress:WPMU Functions/get blog list

来自站长百科
跳转至: 导航、​ 搜索

Returns a stdClass Object of blogs with each in the following format:

返回博客的stdClass Object,每个Object的格式如下:

 stdClass Object (
   [blog_id] => 1
   [site_id] => 1
   [domain] => sub.example.com
   [path] => /pathname/
   [registered] => 2008-01-01 01:00:00
   [last_updated] => 2008-01-01 01:00:00
   [public] => 1
   [archived] => 0
   [mature] => 0
   [spam] => 0
   [deleted] => 0
   [lang_id] => 0
   [blogname] => Blog Name
   [siteurl] => http://sub.example.com/pathname
   [post_count] => 1
 )

stdClass Object (

   [blog_id] => 1
   [site_id] => 1
   [domain] => sub.example.com
   [path] => /pathname/
   [registered] => 2008-01-01 01:00:00
   [last_updated] => 2008-01-01 01:00:00
   [public] => 1
   [archived] => 0
   [mature] => 0
   [spam] => 0
   [deleted] => 0
   [lang_id] => 0
   [blogname] => Blog Name
   [siteurl] => http://sub.example.com/pathname
   [post_count] => 1
 )

Note[ ]

注意[ ]

Orders the blog list by registered date in descending order (oldest to newest). As such, using start and end may slice blogs other than than those desired. An improvement to this would be to sort by blog_id, blogname or even allowing the developer to specify their own order (for example: get_blog_list(0,10,true,blogname).

以递减的顺序,根据博客的注册日期,列出博客(从最晚注册到最新注册)。这样,使用start and end可能会分开博客,而不会得到预期的效果。改善的方法是根据blog_id,博客名分类,甚至允许开发人员规定自己的博客顺序(例如:get_blog_list(0,10,正确的,博客名)。



Return to WordPress:WPMU_Functions

返回到 WPMU_Functions