swap out ordering code
This commit is contained in:
parent
350fae9aa8
commit
72d7ddbee5
|
@ -24,9 +24,11 @@ class ComicPressComicPost {
|
||||||
function display_attached_images($type = "comic", $limit = null, $size_type = null) {
|
function display_attached_images($type = "comic", $limit = null, $size_type = null) {
|
||||||
if (is_null($size_type)) { $size_type = $type; }
|
if (is_null($size_type)) { $size_type = $type; }
|
||||||
$found = false;
|
$found = false;
|
||||||
if (is_array($this->get_comic_image_attachments())) {
|
$ordering = $this->normalize_comic_image_ordering($this->post->ID);
|
||||||
foreach ($this->get_comic_image_attachments() as $attachment) {
|
if (is_array($ordering[$type])) {
|
||||||
if (get_post_meta($attachment->ID, "comic_image_type", true) == $type) {
|
foreach ($ordering[$type] as $attachment_id) {
|
||||||
|
if (get_post_meta($attachment_id, "comic_image_type", true) == $type) {
|
||||||
|
$attachment = get_post($attachment_id);
|
||||||
$title = (!empty($attachment->post_excerpt) ? $attachment->post_excerpt : $attachment->post_title);
|
$title = (!empty($attachment->post_excerpt) ? $attachment->post_excerpt : $attachment->post_title);
|
||||||
echo $this->get_comic_img_tag(wp_get_attachment_url($attachment->ID, ''), $size_type, array('title' => $title));
|
echo $this->get_comic_img_tag(wp_get_attachment_url($attachment->ID, ''), $size_type, array('title' => $title));
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
Loading…
Reference in New Issue