' . $style . ''; } $output .= '
'; $output .= '
'; $pos = 0; foreach ($gallery_items as $item_id => $attachment) { $link_target = get_post_meta($attachment->ID, '_gallery_link_target', true); $link_target = ($link_target !== '') ? $link_target : '_self'; $downloads = $this->wpmfGalleryGetDownloadLink($attachment->ID); switch ($link) { case 'file': $image_output = $this->getAttachmentLink($item_id, $size, false, $targetsize, false, $link_target, $pos); break; case 'post': $image_output = $this->getAttachmentLink($item_id, $size, true, $targetsize, false, $link_target, $pos); break; case 'none': $image_output = wp_get_attachment_image($item_id, $size, false, array('data-type' => 'wpmfgalleryimg')); break; case 'custom': $image_output = $this->getAttachmentLink($item_id, $size, false, $targetsize, true, $link_target, $pos); break; default: $image_output = $this->getAttachmentLink($item_id, $size, false, $targetsize, false, $link_target, $pos); } if ($enable_download) { $image_output .= ' file_download '; } $output .= ''; $pos++; } $output .= "
\n";