[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
Fri Oct 16 09:24:32 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:  4.4
Component:  Networks and Sites                   |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback has-unit-     |     Focuses:  multisite
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by imath):

 * keywords:  has-patch dev-feedback has-unit-tests needs-refresh => has-
     patch dev-feedback has-unit-tests


Comment:

 Replying to [comment:11 swissspidy]:
 > I wouldn't do `restore_current_blog()` right after
 `wp_get_attachment_image_src()`. Just before the return is fine, otherwise
 it makes the whole if clause more complex.

 I agree, and i think it was already the case in 34312.patch :)

 > I'd replace `wp_get_attachment_image_src()` with
 `wp_get_attachment_image_url()` though, a nice little helper function for
 such cases.

 I agree. Thanks a lot for this recommendation.

 > Otherwise the patch looks good, though I would create 1 patch containing
 both the changes and the tests. Makes it easier to verify.

 Ok, if i've added the unit test in a separate file in the first place,
 that was to "make easier the illustration of the issue" ( < sorry this
 might not be good english) by running it without the suggested fix.

 But i agree, 34312.02.patch is taking in account all your recommendations.
 Thanks a lot for your feedback :)

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


More information about the wp-trac mailing list