·'
: '';
return sprintf(
'%s',
$els['thumbnail_no_cats'],
$els['cats_html'],
$els['title'],
$els['author'],
$separator,
$els['date'],
$els['excerpt'],
$els['button']
);
}
/** Layout 1 — Classic. */
protected static function render_layout_1( array $els ) {
return sprintf(
'%s%s%s%s%s%s%s
',
$els['thumbnail'],
$els['standalone_categories'],
$els['author'],
$els['title'],
$els['excerpt'],
$els['button'],
$els['date']
);
}
/** Layout 2 — Stacked Meta. */
protected static function render_layout_2( array $els ) {
return sprintf(
'%s%s',
$els['thumbnail'],
$els['standalone_categories'],
$els['title'],
$els['author'],
$els['date'],
$els['excerpt'],
$els['button']
);
}
/** Layout 3 — Overlay (categories inside content; thumb is its own simpler figure). */
protected static function render_layout_3( array $els ) {
return sprintf(
'%s',
$els['layout3_thumb'],
$els['cats_html'],
$els['title'],
$els['author'],
$els['date'],
$els['excerpt'],
$els['button']
);
}
/** Layout 4 — Avatar Above (separate avatar block between thumb and content). */
protected static function render_layout_4( array $els ) {
return sprintf(
'%s%s%s',
$els['thumbnail'],
$els['standalone_categories'],
$els['floating_avatar'],
$els['title'],
$els['author'],
$els['date'],
$els['excerpt']
);
}
/** Layout 5 — Spotlight (Modern). */
protected static function render_layout_5( array $els ) {
// Bullet separator only when both author and date are present.
$separator = ( '' !== $els['author'] && '' !== $els['date'] )
? '·'
: '';
return sprintf(
'%s',
$els['thumbnail_no_cats'],
$els['cats_html'],
$els['title'],
$els['excerpt'],
$els['author'],
$separator,
$els['date'],
$els['button']
);
}
}