Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
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
Version | Description |
---|---|
4.3.3 | Introduced. |