diff --git a/includes/assets.php b/includes/assets.php index 7923962..a8ca494 100644 --- a/includes/assets.php +++ b/includes/assets.php @@ -482,7 +482,7 @@ public function print_footer_scripts() { acf_localize_data( $data_to_localize ); // Print inline script. - printf( "\n", 'acf.data = ' . wp_json_encode( $this->data ) . ';' ); + wp_print_inline_script_tag( 'acf.data = ' . wp_json_encode( $this->data ) . ';' ); if ( wp_script_is( 'acf-input' ) ) { @@ -495,7 +495,7 @@ public function print_footer_scripts() { */ $compat_l10n = apply_filters( 'acf/input/admin_l10n', array() ); if ( $compat_l10n ) { - printf( "\n", 'acf.l10n = ' . wp_json_encode( $compat_l10n ) . ';' ); + wp_print_inline_script_tag( 'acf.l10n = ' . wp_json_encode( $compat_l10n ) . ';' ); } /** @@ -518,7 +518,7 @@ public function print_footer_scripts() { do_action( 'acf/admin_print_footer_scripts' ); // Once all data is localized, trigger acf.prepare() to execute functionality before DOM ready. - printf( "\n", "acf.doAction( 'prepare' );" ); + wp_print_inline_script_tag( "acf.doAction( 'prepare' );" ); } /**