[wp-trac] [WordPress Trac] #40292: Twenty Seventeen: Use echo file_get_contents() instead of require_once() to pull in SVG file contents
WordPress Trac
noreply at wordpress.org
Fri Oct 6 13:26:27 UTC 2023
#40292: Twenty Seventeen: Use echo file_get_contents() instead of require_once() to
pull in SVG file contents
-----------------------------------+------------------------------
Reporter: kellenmace | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.7.3
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------------------
Changes (by bedas):
* keywords: has-patch => has-patch 2nd-opinion
Comment:
Any reason why to bypass the WPCS and not use
{{{#!php
<?php
$filesystem = new WP_Filesystem_Direct( true );
// Now use it like this
$filesystem->get_contents($path)
}}}
?
Admittedly much more cumbersome than a one-function call, but it is what
WPCS expects us to do.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40292#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list