Description
Used to change the newline character at the end of JSON files.
Changelog
- Added in version 6.2.
Parameters
apply_filters( 'acf/json/eof_newline', $newline_character );
$newline_character
(string) The current newline character,PHP_EOL
by default.
Example
This example demonstrates how to change the newline character at the end of JSON files.
functions.php
<?php
function custom_acf_json_eof_newline( $newline_character ) {
return "\r\n";
}
add_filter( 'acf/json/eof_newline', 'custom_acf_json_eof_newline' );
Supercharge Your Website With Premium Features Using ACF PRO
Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.