PluginProbe
WP Attachments / 3.2.3
WP Attachments v3.2.3
6.0.2 6.0.3 trunk 2.0 3 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.4 3.5 3.5.1 3.5.2 3.5.3 3.5.4 All 52 releases
wp-attachments / html / metabox.php

metabox.php in WP Attachments 3.2.3, at html/metabox.php

58 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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" title="<?php echo esc_attr($atchment->post_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> &bull;
28 <a href="<?php echo wp_get_attachment_url($atchment->ID); ?>" class="ij-post-attachment-edit"><?php _e('Edit'); ?></a> &bull;
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 echo (strlen($atchment->post_title) > 22) ? (substr(esc_html($atchment->post_title), 0, 22) . '...') : esc_html($atchment->post_title); ?></h3>
35 </div>
36
37 <!--Item body-->
38 <div style="padding:1px 5px 5px">
39 <div class="ij-post-attachment-type">
40 <?php
41 echo '<div style="float:right;"><b>';
42 echo wpatt_format_bytes(filesize(get_attached_file($atchment->ID)));
43 echo '</b></div>';
44 $strr = array("image/", "application/");
45 echo strtoupper(str_replace($strr, '', get_post_mime_type($atchment->ID)));
46 ?>
47 </div>
48
49 </div>
50 </li>
51 <?php endwhile; ?>
52 </ul>
53 <div class="clear"></div>
54 </div>
55 <?php else: ?>
56 <p><?php _e('No media attachments found.'); ?></p>
57 <?php endif; ?>
58