[wp-trac] [WordPress Trac] #47398: Remove wp_favicon_request
WordPress Trac
noreply at wordpress.org
Sat Jun 8 15:25:25 UTC 2019
#47398: Remove wp_favicon_request
----------------------------------+-----------------------------
Reporter: jonoaldersonwp | Owner: SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.3
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch seo commit | Focuses:
----------------------------------+-----------------------------
Comment (by birgire):
[attachment:"47398.3.diff"] could be simplified with the
{{{get_site_icon_url()}}} that supports a fallback image.
Users that use Photon from JetPack will have images served from e.g.
i2.wp.com.
So the output from {{{wp_get_attachment_image_src( $site_icon_id, array(
32, 32 ) )}}} would contain a source like:
{{{
https://i2.wp.com/example.com/wp-
content/uploads/2019/06/image.jpg?fit=32%2C32&ssl=1
}}}
but it seems {{{wp_check_filetype()}}} doesn't support query arguments
like {{{?fit=32%2C32&ssl=1}}}
Another thing to consider is that some prefer to set
{{{allow_url_fopen=0}}} in {{{php.ini}}}, for security reasons. I don't
recall if WordPress requires {{{allow_url_fopen=1}}}, but it would be
informative to check it out.
In the case of {{{allow_url_fopen=0}}}, neither the {{{readfile()}}} or
{{{wp_check_filetype()}}} will work for sites with the site icon set (i.e.
https:// or http:// file wrappers), external or not.
I wonder if it would be better to use the file path instead of file url of
the site icon. But in that case the fallback favicon would also kick in
for external site icons.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47398#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list