Skip to content

Commit

Permalink
Merge pull request #558 from 10up/fix/557-TTS-audio-leak
Browse files Browse the repository at this point in the history
#557 - Fix - Prevent TTS Audio leakage into places using excerpts (like archives)
  • Loading branch information
dkotter authored Aug 17, 2023
2 parents 158bfdf + e320c41 commit d1be4e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/Classifai/Providers/Azure/TextToSpeech.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d1be4e8

Please sign in to comment.