Uses
Uses | Description |
---|---|
wp-includes/pomo/po.php: PO::export() | Exports the whole PO file as a string |
Same as {@link export}, but writes the result to a file
(string) (Required) Where to write the PO string.
(bool) (Optional) Whether to include the headers in the export.
Default value: true
(bool) true on success, false on error
File: wp-includes/pomo/po.php
function export_to_file( $filename, $include_headers = true ) { $fh = fopen( $filename, 'w' ); if ( false === $fh ) { return false; } $export = $this->export( $include_headers ); $res = fwrite( $fh, $export ); if ( false === $res ) { return false; } return fclose( $fh ); }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/po/export_to_file