acf/json/eof_newline
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_EOLby 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' );
这篇文档对你有帮助吗?
谢谢你的反馈!