mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-07-21 00:35:30 -04:00
temporary revert of shortcodes.php possible fix for correct display of image
This commit is contained in:
@@ -204,11 +204,10 @@ function ceo_archive_list_all($order = 'ASC', $thumbnail = 0) {
|
||||
$main_args = array(
|
||||
'hide_empty' => true,
|
||||
'order' => $order,
|
||||
'orderby' => 'menu_order',
|
||||
'hierarchical' => 1
|
||||
);
|
||||
add_filter('get_terms_orderby', 'ceo_get_terms_orderby', 10, 2 );
|
||||
$all_chapters = get_terms('chapters', $main_args);
|
||||
remove_filter('get_terms_orderby', 'ceo_get_terms_orderby');
|
||||
if (is_null($all_chapters)) { echo 'There are no chapters available.'; return; }
|
||||
$output = '';
|
||||
foreach ($all_chapters as $chapter) {
|
||||
@@ -228,7 +227,7 @@ function ceo_archive_list_all($order = 'ASC', $thumbnail = 0) {
|
||||
$qposts = get_posts( $args );
|
||||
$archive_count = 0;
|
||||
if ($thumbnail) {
|
||||
$get_thumbnail = ($order == 'asc') ? get_the_post_thumbnail(reset($qposts)->ID, 'thumbnail') : get_the_post_thumbnail(end($qposts)->ID, 'thumbnail');
|
||||
$get_thumbnail = (strtoupper($order) == 'ASC') ? get_the_post_thumbnail(reset($qposts)->ID, 'thumbnail') : get_the_post_thumbnail(end($qposts)->ID, 'thumbnail');
|
||||
$output .= '<div class="comic-archive-thumbnail">'.$get_thumbnail.'</div>'."\r\n";
|
||||
}
|
||||
$output .= '<div class="comic-archive-list-wrap">'."\r\n";
|
||||
@@ -253,11 +252,10 @@ function ceo_archive_list_series($thumbnail = 0) {
|
||||
'pad_counts' => 0,
|
||||
'order' => 'DESC',
|
||||
'hide_empty' => 0,
|
||||
'parent' => 0
|
||||
'parent' => 0,
|
||||
'orderby' => 'menu_order'
|
||||
);
|
||||
add_filter('get_terms_orderby', 'ceo_get_terms_orderby', 10, 2 );
|
||||
$parent_chapters = get_terms('chapters', $args);
|
||||
remove_filter('get_terms_orderby', 'ceo_get_terms_orderby');
|
||||
if (is_array($parent_chapters)) {
|
||||
foreach($parent_chapters as $parent_chapter) {
|
||||
$output .= '<h2 class="comic-archive-series-title">'.$parent_chapter->name.'</h2>';
|
||||
@@ -299,17 +297,16 @@ function ceo_archive_list_series($thumbnail = 0) {
|
||||
}
|
||||
}
|
||||
|
||||
function ceo_archive_list_by_chapter_thumbnails($order = 'asc', $showtitle = false) {
|
||||
function ceo_archive_list_by_chapter_thumbnails($order = 'ASC', $showtitle = false) {
|
||||
$output = '';
|
||||
$archive_count = 0;
|
||||
$args = array(
|
||||
'pad_counts' => 0,
|
||||
'order' => $order,
|
||||
'hide_empty' => 1
|
||||
'hide_empty' => 1,
|
||||
'orderby' => 'menu_order'
|
||||
);
|
||||
add_filter('get_terms_orderby', 'ceo_get_terms_orderby', 10, 2 );
|
||||
$chapters = get_terms('chapters', $args);
|
||||
remove_filter('get_terms_orderby', 'ceo_get_terms_orderby');
|
||||
if (is_array($chapters) && !is_wp_error($chapters)) {
|
||||
$output .= '<div class="comic-archive-list-4">';
|
||||
foreach($chapters as $chapter) {
|
||||
|
||||
Reference in New Issue
Block a user