[wp-trac] [WordPress Trac] #34312: On Multisite has_site_icon( $child_blog_id ) when checking from the root blog is false even if the child blog has a site icon

WordPress Trac noreply at wordpress.org
Thu Oct 15 12:08:40 UTC 2015


#34312: On Multisite has_site_icon( $child_blog_id ) when checking  from the root
blog is false even if the child blog has a site icon
------------------------------------+------------------------------
 Reporter:  imath                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Networks and Sites      |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  multisite
------------------------------------+------------------------------

Comment (by imath):

 Thanks for your reply @BinaryKitten

 > after the get_option function call

 That's precisely the problem i think. Because the blog has been restored
 too early. And when the function is using `wp_get_attachment_image_src()`
 we're no more on the requested blog but on the current blog.

 So in the best case, it doesn't find any image. On the worse case it could
 find an attachment on the current blog having the same id and then the
 site icon would be wrong.

 I think `restore_current_blog()` should happen after
 `wp_get_attachment_image_src()`. Well it's fixing the issue for me :)

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


More information about the wp-trac mailing list