" escaped so the data cannot close the script element. */ static function json_ld($data) { $json = wp_json_encode($data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); if (!is_string($json) || $json === '') return; wp_print_inline_script_tag($json, ['type' => 'application/ld+json']); } }