';
$json_ld_data = array_filter( (array) tribe_cache()['json-ld-data'] );
if ( ! empty( $json_ld_data ) ) {
$html .= '
';
$html .= sprintf(
'
The request produced %d JSON-LD data %s.',
count( $json_ld_data ),
count( $json_ld_data ) > 1 ? 'scripts' : 'script'
);
$html .= '
Copy the code below and paste it into ' .
'' .
'Google\'s Structured Data Testing Tool' .
'' .
' to test it using the Code Snippet option.
';
foreach ( $json_ld_data as $full_entry ) {
preg_match(
'/(?
^\\s*