0 ) { return; } if ( self::$did_emit ) { return; } $context = ContextResolver::build(); $payload = BuildJsonLd::from_context( $context ); $payload = apply_filters( 'airygen_schema_jsonld_payload', $payload, $context ); if ( empty( $payload ) ) { return; } $json = wp_json_encode( $payload, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ); if ( false === $json ) { return; } wp_print_inline_script_tag( $json, array( 'type' => 'application/ld+json' ) ); self::$did_emit = true; do_action( 'airygen_schema_jsonld_emitted' ); } }