From e320c419fecdf6d5cef975fec96bd97fc9554071 Mon Sep 17 00:00:00 2001 From: Joshua Abenazer Date: Thu, 10 Aug 2023 13:20:57 +0530 Subject: [PATCH] #557 - Fix - Prevent TTS Audio leakage into places using excerpts (like archives) --- includes/Classifai/Providers/Azure/TextToSpeech.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Classifai/Providers/Azure/TextToSpeech.php b/includes/Classifai/Providers/Azure/TextToSpeech.php index e7b156895..de6031756 100644 --- a/includes/Classifai/Providers/Azure/TextToSpeech.php +++ b/includes/Classifai/Providers/Azure/TextToSpeech.php @@ -732,6 +732,10 @@ public function render_post_audio_controls( $content ) { return $content; } + if ( ! is_singular( $_post->post_type ) ) { + return $content; + } + if ( ! in_array( $_post->post_type, get_tts_supported_post_types(), true ) ) { return $content; }