acf/json/eof_newline

Last updated Apr 4, 2024

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.

Explore Features View Pricing

PRO Features
ACF Blocks
Options Pages
PRO Fields
Repeater
Flexible Content
Gallery
Clone