[wp-trac] [WordPress Trac] #48192: get_blogs_of_user not setting public parameter

WordPress Trac noreply at wordpress.org
Tue Oct 1 22:05:13 UTC 2019


#48192: get_blogs_of_user not setting public parameter
--------------------------------+------------------------------
 Reporter:  tifosi              |       Owner:  (none)
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> Hello.
>
> For multisite installations get_blogs_of_user uses get_sites to retrieve
> all multisite instances. This contains parameters such as archived,
> deleted, etc, and also the public parameter.
>
> The get_blogs_of_user function iterates through the results of get_sites
> and sets the blogs array of blog objects. It matches and sets all
> parameters from get_sites, but omits the 'public' parameter, probably by
> oversight.
>
> For example a blog from get_blogs_of_user:
>
>  stdClass Object (
>     [userblog_id] => 2
>     [blogname] => Site 2
>     [domain] => example.com
>     [path] => /de/
>     [site_id] => 1
>     [siteurl] => http://example.com/de
>     [archived] => 0
>     [mature] => 0
>     [spam] => 0
>     [deleted] => 0
>     [blog_id] => 2
>     [description] => 2
>     [language] => de_DE
> )
>
> No way apart from using the 'get_blogs_of_user' filter to reiterate the
> sites and set the value.
>
> Requires the public parameter to be set.

New description:

 Hello.

 For multisite installations get_blogs_of_user uses get_sites to retrieve
 all multisite instances. This contains parameters such as archived,
 deleted, etc, and also the public parameter.

 The get_blogs_of_user function iterates through the results of get_sites
 and sets the blogs array of blog objects. It matches and sets all
 parameters from get_sites, but omits the 'public' parameter, probably by
 oversight.

 For example a blog from get_blogs_of_user:
 {{{
  stdClass Object (
     [userblog_id] => 2
     [blogname] => Site 2
     [domain] => example.com
     [path] => /de/
     [site_id] => 1
     [siteurl] => http://example.com/de
     [archived] => 0
     [mature] => 0
     [spam] => 0
     [deleted] => 0
     [blog_id] => 2
     [description] => 2
     [language] => de_DE
 )
 }}}
 No way apart from using the 'get_blogs_of_user' filter to reiterate the
 sites and set the value.

 Requires the public parameter to be set.

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48192#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list