You appear to be a bot. Output may be restricted
Description
Prepares data for outputting as JSON.
Usage
$false|string = WPSEO_Utils::format_json_encode( $data );
Parameters
- $data
- ( array ) required – The data to format.
Returns
false|string The prepared JSON string.
Source
File name: wordpress-seo/inc/class-wpseo-utils.php
Lines:
1 to 17 of 17
public static function format_json_encode( $data ) { $flags = ( JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); if ( self::is_development_mode() ) { $flags = ( $flags | JSON_PRETTY_PRINT ); /** * Filter the Yoast SEO development mode. * * @api array $data Allows filtering of the JSON data for debug purposes. */ $data = apply_filters( 'wpseo_debug_json_data', $data ); } // phpcs:ignore Yoast.Yoast.AlternativeFunctions.json_encode_wp_json_encodeWithAdditionalParams -- This is the definition of format_json_encode. return wp_json_encode( $data, $flags ); }