{"id":18927526,"date":"2026-06-03T12:23:46","date_gmt":"2026-06-03T12:23:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/import-export-csv-7\/"},"modified":"2026-06-03T12:23:46","modified_gmt":"2026-06-03T12:23:46","slug":"import-export-csv-7","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/import-export-csv-7\/","title":{"rendered":"Import export .csv"},"content":{"rendered":"<p>I am the developer of plugin wp-photo-album-plus<br \/>\nOne of the (admin) features is to import\/export media item metadata in the form of .csv files.<br \/>\nI use the php functions str_getcsv() and fputcsv().<br \/>\nTo use fputcsv() a file must be opend by fopen(), and afterwards closed by fclose(). I also use fwrite() for the header line of the .csv file.<\/p>\n<p>However, plugin check reports the following errors:<\/p>\n<blockquote><p>\nERROR \tWordPress.WP.AlternativeFunctions.file_system_operations_fopen File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().<br \/>\nERROR \tWordPress.WP.AlternativeFunctions.file_system_operations_fclose File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().<br \/>\nERROR \tWordPress.WP.AlternativeFunctions.file_system_operations_fwrite \tFile operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fwrite().\n<\/p><\/blockquote>\n<p>And these functions do not exist in WP_Filesystem_Direct.<\/p>\n<p>So, any idea how to fix this?<\/p>\n","protected":false},"template":"","class_list":["post-18927526","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18927526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18927526\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18927526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}