[wp-trac] [WordPress Trac] #41329: Undefined constants in class WP_Filesystem_Direct

WordPress Trac noreply at wordpress.org
Wed Sep 27 03:20:24 UTC 2017


#41329: Undefined constants in class WP_Filesystem_Direct
----------------------------+-----------------------------
 Reporter:  nabil_kadimi    |       Owner:
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Filesystem API  |     Version:  trunk
 Severity:  normal          |  Resolution:  wontfix
 Keywords:  has-patch       |     Focuses:  administration
----------------------------+-----------------------------
Changes (by dd32):

 * status:  new => closed
 * focuses:  administration, performance => administration
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 `WP_Filesystem_Direct()` is not designed to be used stand alone. Plugins
 shouldn't use it if they simply want to modify files directly on the
 filesystem, instead they should use functions such as
 `file_get_contents()` directly.

 `WP_Filesystem_Direct` should only be accessed through using the
 `WP_Filesystem()` method (found in wp-admin/includes/file.php). If you're
 using it in any other way, you're complicating your own code and
 increasing the chances of your code breaking in the future.

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


More information about the wp-trac mailing list