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