Skip to content

Commit

Permalink
Merge pull request #55 from UCF/classic-layout-updates
Browse files Browse the repository at this point in the history
Classic layout updates
  • Loading branch information
jmbarne3 authored Feb 26, 2021
2 parents 1600d30 + 5fca58d commit 7f1e033
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion includes/ucf-news-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static function get_statements( $args ) {
$params = array();

if ( isset( $args['limit'] ) ) {
$params['limit'] = $args['limit'];
$params['per_page'] = $args['limit'];
}

if ( isset( $args['offset'] ) ) {
Expand Down
15 changes: 9 additions & 6 deletions layouts/ucf-statements-classic.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ function ucf_statements_classic_title( $content, $items, $args ) {
function ucf_statements_classic_content( $content, $items, $args ) {
ob_start();

foreach( $items as $item ) :
foreach( $items as $idx => $item ) :
?>
<article class="mb-4">
<?php if ( $idx !== 0 ) : ?>
<hr class="hr-1">
<?php endif; ?>
<article class="mb-3">
<a href="<?php echo $item->link; ?>" target="_blank" rel="nofollow">
<strong class="d-block h6 text-secondary ucf-statement-title"><?php echo $item->title->rendered; ?></strong>
<strong class="d-block h5 ucf-statement-title mb-1"><?php echo $item->title->rendered; ?></strong>
</a>
<?php if ( $item->tu_author ) : ?>
<cite class="ucf-statement-author text-muted text-small">
<?php echo $item->tu_author->name; ?>
<cite class="ucf-statement-author d-block font-italic">
<?php echo $item->tu_author->fullname; ?>
</cite>
<?php endif; ?>
<time datetime="<?php echo $item->date; ?>" class="d-block ucf-statement-date">
<time datetime="<?php echo $item->date; ?>" class="d-block ucf-statement-date small text-default">
<?php echo date('F j, Y', strtotime($item->date)); ?>
</time>
</article>
Expand Down

0 comments on commit 7f1e033

Please sign in to comment.