[wp-trac] [WordPress Trac] #34809: how to do file_get_contents in WordPress

WordPress Trac noreply at wordpress.org
Sat Nov 28 08:44:48 UTC 2015


#34809: how to do file_get_contents in WordPress
----------------------------+-----------------------------
 Reporter:  rinkuyadav999   |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Filesystem API  |    Version:  4.3.1
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 Hi

 I am developing a free WordPress theme.

 Theme check plugin display:

 WARNING: file_get_contents was found in the file customizer.php File
 operations should use the WP_Filesystem methods instead of direct PHP
 filesystem calls.

 Line 10: $fonts = file_get_contents( get_template_directory() . '/json
 /google-fonts.json' );


 I can't found, how to use file_get_contents in WordPress.

 Thank you
 Regards
 Rinku Y

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34809>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list