| 1 |
<?php |
| 2 |
if ($images_with_posts->have_posts()) : ?> |
| 3 |
<table class="widefat isc-table" style="width: 80%;" > |
| 4 |
<thead> |
| 5 |
<tr> |
| 6 |
<th><?php _e('Image', ISCTEXTDOMAIN); ?></th> |
| 7 |
<th><?php _e('Posts', ISCTEXTDOMAIN); ?></th> |
| 8 |
</tr> |
| 9 |
</thead><tbody><?php |
| 10 |
|
| 11 |
while ($images_with_posts->have_posts()) : |
| 12 |
$images_with_posts->the_post(); |
| 13 |
$_posts = get_post_meta(get_the_ID(), 'isc_image_posts', true); |
| 14 |
if(is_array($_posts) && count($_posts) > 0) : ?> |
| 15 |
<tr> |
| 16 |
<td><a href="<?php echo admin_url('media.php?attachment_id=' . get_the_ID() . '&action=edit'); ?>"><?php the_title(); ?></a></td> |
| 17 |
<td> |
| 18 |
<ul><?php |
| 19 |
foreach($_posts as $_post_id) : ?> |
| 20 |
<li><a href="<?php echo get_edit_post_link( $_post_id ); ?>"><?php echo $_post_id; ?></a></li> |
| 21 |
<?php endforeach; ?> |
| 22 |
</ul> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
<?php endif; ?> |
| 26 |
<?php endwhile; ?> |
| 27 |
</tbody></table><?php |
| 28 |
endif; |