| 1 |
<p> |
| 2 |
<a href="<?php echo admin_url('media-upload.php?post_id=' . $post->ID); ?>&TB_iframe=1&width=640&height=693" |
| 3 |
onclick="return false" class="button-primary thickbox"> |
| 4 |
<?php _e('Add Media'); ?> |
| 5 |
</a> |
| 6 |
</p> |
| 7 |
<?php if ($attachments->have_posts()): ?> |
| 8 |
<div id="ij-post-attachments" class="ij-post-attachment-list"> |
| 9 |
<ul class="alignleft"> |
| 10 |
<?php while ($attachments->have_posts()): $atchment = $attachments->next_post(); ?> |
| 11 |
<li class="ij-post-attachment" |
| 12 |
data-mimetype="<?php echo $atchment->post_mime_type; ?>" |
| 13 |
data-alt="<?php echo esc_attr(get_post_meta(611, '_wp_attachment_image_alt', true)); ?>" |
| 14 |
data-attachmentid="<?php echo $atchment->ID; ?>" |
| 15 |
data-url="<?php echo wp_get_attachment_url($atchment->ID); ?>" |
| 16 |
data-title="<?php echo esc_attr($atchment->post_title); ?>"> |
| 17 |
|
| 18 |
<!--Item title--> |
| 19 |
<div class="ij-post-attachment-title"> |
| 20 |
<h3> |
| 21 |
|
| 22 |
<div style="float:left;"> |
| 23 |
<?php echo wp_get_attachment_image($atchment->ID, array(80, 60), true); ?> |
| 24 |
</div> |
| 25 |
|
| 26 |
<div style="float:right;"> |
| 27 |
<a href="#insert-media-button" class="ij-post-attachment-insert"><?php _e('Insert into post'); ?></a> • |
| 28 |
<a href="<?php echo wp_get_attachment_url($atchment->ID); ?>" class="ij-post-attachment-edit"><?php _e('Edit'); ?></a> • |
| 29 |
<!--<a href="<?php echo wp_nonce_url(admin_url('post.php') . '?action=delete&post=' . $atchment->ID, 'delete-attachment_' . $atchment->ID); ?>" class="ij-post-attachment-delete"><?php _e('Remove'); ?></a>--> |
| 30 |
|
| 31 |
<a href="<?php echo get_delete_post_link($atchment->ID); ?>" onclick = "if (! confirm('<?php _e('Are you sure you want to do this?');?>')) { return false; }"><?php _e('Remove'); ?></a> |
| 32 |
</div> |
| 33 |
|
| 34 |
<?php |
| 35 |
$wpatt_option_includeimages_get = get_option('wpatt_option_includeimages'); |
| 36 |
if (!($wpatt_option_includeimages_get == '1' && wp_attachment_is_image($atchment->ID))) { |
| 37 |
echo '<img title="This file will be listed in the front-end" src="' . plugin_dir_url(__FILE__) . 'eye.png"/>'; |
| 38 |
} |
| 39 |
?> |
| 40 |
<?php echo (strlen($atchment->post_title) > 22) ? (substr(esc_html($atchment->post_title), 0, 22) . '...') : esc_html($atchment->post_title); ?></h3> |
| 41 |
</div> |
| 42 |
|
| 43 |
<!--Item body--> |
| 44 |
<div style="padding:1px 5px 5px"> |
| 45 |
<div class="ij-post-attachment-type"> |
| 46 |
<?php |
| 47 |
echo '<div style="float:right;"><b>'; |
| 48 |
echo wpatt_format_bytes(filesize(get_attached_file($atchment->ID))); |
| 49 |
echo '</b></div>'; |
| 50 |
$strr = array("image/", "application/"); |
| 51 |
echo strtoupper(str_replace($strr, '', get_post_mime_type($atchment->ID))); |
| 52 |
?> |
| 53 |
</div> |
| 54 |
|
| 55 |
</div> |
| 56 |
</li> |
| 57 |
<?php endwhile; ?> |
| 58 |
</ul> |
| 59 |
<div class="clear"></div> |
| 60 |
<small>Powered by WordPress WP Attachments</small> |
| 61 |
</div> |
| 62 |
<?php else: ?> |
| 63 |
<p><?php _e('No media attachments found.'); ?></p> |
| 64 |
<?php endif; ?> |
| 65 |
|