-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat-quote.php
More file actions
28 lines (26 loc) · 999 Bytes
/
format-quote.php
File metadata and controls
28 lines (26 loc) · 999 Bytes
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
<?php
/**
* Template for quote posts.
*
* @package Fixed Child
* @since 1.0
*/
?>
<div class="box-wrap">
<div class="box">
<div class="format-quote post-content">
<figure class="quote">
<?php the_content();
$source = get_post_meta($post->ID, '_format_quote_source_name', true);
$sourceUrl = get_post_meta($post->ID, '_format_quote_source_url', true);
if ($source && !$sourceUrl) : ?>
<figcaption class="quote-source"><?php echo $source; ?></figcaption>
<?php elseif (!$source && $sourceUrl): ?>
<figcaption class="quote-source"><a href="<?php echo $sourceUrl; ?>"><?php echo $sourceUrl; ?></a></figcaption>
<?php elseif ($source && $sourceUrl): ?>
<figcaption class="quote-source"><a href="<?php echo $sourceUrl; ?>"><?php echo $source; ?></a></figcaption>
<?php endif; ?>
</figure>
</div><!-- .post-content -->
</div><!-- .box -->
</div><!-- .box-wrap -->