/
loop_end.php
34 lines (31 loc) · 1.32 KB
/
loop_end.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/** Automagic integration for loop_end.
*
* @package Webcomic
* @uses WebcomicTag::get_webcomic_transcript_authors()
* @uses WebcomicTag::get_the_webcomic_transcript_term_list()
* @uses is_webcomic()
* @uses get_webcomic_transcripts()
* @uses webcomic_transcripts_open()
* @uses have_webcomic_transcripts()
* @uses webcomic_transcript_form()
*/
if ( is_webcomic() ) {
global $post;
if ( $transcripts = get_webcomic_transcripts() ) {
?>
<h3 id="webcomic-transcripts"><?php sprintf( __( '%s Transcripts', 'webcomic' ), the_title( '', '', false ) ); ?></h3>
<?php foreach ( $transcripts as $post ) { setup_postdata( $post ); ?>
<div class="webcomic-transcript-content"><?php the_content(); ?></div>
<div class="webcomic-transcript-meta"><?php printf( __( 'Transcribed by %1$s%2$s', 'webcomic' ), WebcomicTag::get_webcomic_transcript_authors(), WebcomicTag::get_the_webcomic_transcript_term_list( 0, 'webcomic_language', __( ' in ', 'webcomic' ), __( ', ', 'webcomic' ), __( '', 'webcomic' ) ) ); ?></div>
<?php wp_reset_postdata(); }
}
if ( webcomic_transcripts_open() ) {
if ( have_webcomic_transcripts( true ) and $transcripts = get_webcomic_transcripts( true ) ) {
foreach ( $transcripts as $transcript ) {
webcomic_transcript_form( array(), $transcript );
}
}
webcomic_transcript_form();
}
}