aioseo_schema_json_flags

This filter can be used to filter the flags that are passed into json_encode when AIOSEO’s schema output is JSON encoded.

This filter can prove useful as some users report better SEO performance when non-Latin unicode characters are not escaped.

Please refer to the official PHP documentation for all supported flags.

Parameters (1)

$flags (int)
The flags for the json_encode function.

Example code snippet

The following code snippet prevents unicode characters from being escaped.

add_filter( 'aioseo_schema_json_flags', 'aioseo_filter_schema_json_flags' ) 

function aioseo_filter_schema_json_flags() {
	return JSON_UNESCAPED_UNICODE;
}

Changelog

VersionDescription
4.3.3Introduced.