get_default_language(); } $transcript = false; $transcripts = $what_did_they_say->get_transcripts($post->ID); if (!empty($transcripts)) { if (isset($transcripts[$language])) { $transcript = $transcripts[$language]; } } return $transcript; } function the_media_transcript($language = null) { $transcript = apply_filters('the_media_transcript', get_the_media_transcript()); echo $transcript; } function get_the_language_name($language = null) { global $what_did_they_say; if (is_null($language)) { $language = $what_did_they_say->get_default_language(); } return $what_did_they_say->get_language_name($language); } function the_language_name($language = null) { $name = apply_filters('the_language_name', get_the_language_name($language)); echo $name; } function transcripts_display($dropdown_message = null, $single_language_message = null) { global $post, $what_did_they_say; if (is_null($dropdown_message)) { $dropdown_message = __('Select a language:', 'what-did-they-say'); } if (is_null($single_language_message)) { $single_language_message = __('%s transcript:', 'what-did-they-say'); } $output = array(); $transcripts = array(); $post_transcripts = $what_did_they_say->get_transcripts($post->ID); if (!empty($post_transcripts)) { foreach ($post_transcripts as $code => $transcript) { $transcript = trim($transcript); if (!empty($transcript)) { $transcripts[$code] = $transcript; } } if (count($transcripts) > 0) { $default_language = $what_did_they_say->get_default_language(); $output[] = '
'; if (count($transcripts) == 1) { list($code, $transcript) = each($transcripts); $output[] = apply_filters('the_language_name', get_the_language_name($code)); $output[] = apply_filters('the_media_transcript', $transcript); } else { $output[] = $dropdown_message; $output[] = ''; foreach ($transcripts as $code => $transcript) { $language_name = apply_filters('the_language_name', get_the_language_name($code)); $transcript = apply_filters('the_media_transcript', $transcript); $output[] = '
' . $language_name . $transcript . '
'; } } $output[] = '
'; } } echo apply_filters('transcripts_display', implode("\n", $output)); } function the_media_transcript_queue_editor() { global $post, $what_did_they_say; $queued_transcripts_for_user = false; $user = wp_get_current_user(); if (!empty($user)) { $queued_transcripts_for_user = $what_did_they_say->get_queued_transcriptions_for_user_and_post($user->ID, $post->ID); } if (current_user_can('submit_transcriptions')) { ?>

get_language_name($transcript->language) ?>

transcript ?>