acf/json/eof_newline
Usage
add_filter( 'acf/json/eof_newline', 'wp_kama_acf_json_eof_newline_filter' );
/**
* Function for `acf/json/eof_newline` filter-hook.
*
* @param $PHP_EOL
*
* @return
*/
function wp_kama_acf_json_eof_newline_filter( $PHP_EOL ){
// filter...
return $PHP_EOL;
}
- $PHP_EOL
- -
Where the hook is called
acf/json/eof_newline
acf/includes/local-json.php 572
$result = file_put_contents( $file, acf_json_encode( $post ) . apply_filters( 'acf/json/eof_newline', PHP_EOL ) ); //phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents -- potentially could run outside of admin.