[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 08:37:11 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 needs-refresh |
-------------------------------------------------+-------------------------
Changes (by swissspidy):
* keywords: has-patch dev-feedback => has-patch dev-feedback has-unit-
tests needs-refresh
Comment:
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'd replace `wp_get_attachment_image_src()` with
`wp_get_attachment_image_url()` though, a nice little helper function for
such cases.
Otherwise the patch looks good, though I would create 1 patch containing
both the changes and the tests. Makes it easier to verify.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34312#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list