| @@ -6,17 +6,15 @@ | ||
| 6 | 6 | ?> |
| 7 | 7 | <h1><?php _e('Missing Sources', 'isc'); ?></h1> |
| 8 | 8 | |
| 9 | 9 | <?php |
| 10 | -$attachments = ISC_CLASS::get_attachments_with_empty_sources(); | |
| 10 | +$attachments = ISC_CLASS::get_attachments_without_sources(); | |
| 11 | 11 | if (!empty($attachments)) { |
| 12 | - ?><h2><?php _e('Images with empty sources', ISCTEXTDOMAIN); ?></h2> | |
| 13 | - <p><?php _e('Images with empty sources and not belonging to an author.', ISCTEXTDOMAIN); ?></p> | |
| 14 | - <table class="widefat isc-table" style="width: 80%;" > | |
| 12 | + ?><table class="widefat" style="width: 80%;" > | |
| 15 | 13 | <thead> |
| 16 | 14 | <tr> |
| 17 | 15 | <th><?php _e('ID', ISCTEXTDOMAIN); ?></th> |
| 18 | - <th><?php _e('Image title', ISCTEXTDOMAIN); ?></th> | |
| 16 | + <th><?php _e('Image title', 'isc'); ?></th> | |
| 19 | 17 | <th><?php _e('Post / Page', ISCTEXTDOMAIN); ?></th> |
| 20 | 18 | </tr> |
| 21 | 19 | </thead><tbody><?php |
| 22 | 20 | foreach ($attachments as $_attachment) { |
| @@ -23,45 +21,12 @@ | ||
| 23 | 21 | ?><tr> |
| 24 | 22 | <td><?php echo $_attachment->ID; ?></td> |
| 25 | 23 | <td><a href="<?php echo admin_url('media.php?attachment_id=' . $_attachment->ID . '&action=edit'); ?>" title="<?php _e('edit this image', ISCTEXTDOMAIN); ?>"><?php echo $_attachment->post_title; ?></a></td> |
| 26 | 24 | <td><?php if ( $_attachment->post_parent ) : ?><a href="<?php echo get_edit_post_link( $_attachment->post_parent ); ?>" title="<?php _e('show parent post\'s edit page', ISCTEXTDOMAIN ); ?>"><?php echo get_the_title( $_attachment->post_parent ); ?></a><?php else : _e('no connection', ISCTEXTDOMAIN); ?><?php endif; ?></td></tr><?php |
| 27 | - | |
| 25 | + | |
| 28 | 26 | } |
| 29 | 27 | ?></tbody></table><?php |
| 30 | 28 | } else { |
| 31 | 29 | ?> |
| 32 | - <h2><?php _e('No empty sources found!', ISCTEXTDOMAIN); ?></h2> | |
| 30 | + <h2><?php _e('All sources have been specified!', ISCTEXTDOMAIN); ?></h2> | |
| 33 | 31 | <?php |
| 34 | 32 | } |
| 35 | - | |
| 36 | -$attachments = ISC_CLASS::get_attachments_without_sources(); | |
| 37 | -if (!empty($attachments)) { | |
| 38 | - ?><h2><?php _e('Unindexed images', ISCTEXTDOMAIN); ?></h2> | |
| 39 | - <p><?php _e('Images that haven’t been indexed yet, e.g. after plugin installation. (technically speaking: no meta field created yet)', ISCTEXTDOMAIN); ?></p> | |
| 40 | - <table class="widefat isc-table" style="width: 80%;" > | |
| 41 | - <thead> | |
| 42 | - <tr> | |
| 43 | - <th><?php _e('ID', ISCTEXTDOMAIN); ?></th> | |
| 44 | - <th><?php _e('Image title', ISCTEXTDOMAIN); ?></th> | |
| 45 | - <th><?php _e('Post / Page', ISCTEXTDOMAIN); ?></th> | |
| 46 | - </tr> | |
| 47 | - </thead><tbody><?php | |
| 48 | - foreach ($attachments as $_attachment) { | |
| 49 | - ?><tr> | |
| 50 | - <td><?php echo $_attachment->ID; ?></td> | |
| 51 | - <td><a href="<?php echo admin_url('media.php?attachment_id=' . $_attachment->ID . '&action=edit'); ?>" title="<?php _e('edit this image', ISCTEXTDOMAIN); ?>"><?php echo $_attachment->post_title; ?></a></td> | |
| 52 | - <td><?php if ( $_attachment->post_parent ) : ?><a href="<?php echo get_edit_post_link( $_attachment->post_parent ); ?>" title="<?php _e('show parent post\'s edit page', ISCTEXTDOMAIN ); ?>"><?php echo get_the_title( $_attachment->post_parent ); ?></a><?php else : _e('no connection', ISCTEXTDOMAIN); ?><?php endif; ?></td></tr><?php | |
| 53 | - | |
| 54 | - } | |
| 55 | - ?></tbody></table><?php | |
| 56 | -} else { | |
| 57 | - ?> | |
| 58 | - <h2><?php _e('All images are indexed.', ISCTEXTDOMAIN); ?></h2> | |
| 59 | - <?php | |
| 60 | -} ?> | |
| 61 | -<h2><?php _e('Debug', ISCTEXTDOMAIN); ?></h2> | |
| 62 | -<button type="button" id="isc-list-post-image-relation"><?php _e('list post-image relations', ISCTEXTDOMAIN); ?></button> | |
| 63 | -<p class="description"><?php _e('This will list the information ISC knows about the connection between posts and images.', ISCTEXTDOMAIN); ?></p> | |
| 64 | -<div id="isc-post-image-relations"></div> | |
| 65 | -<button type="button" id="isc-list-image-post-relation"><?php _e('list image-post relations', ISCTEXTDOMAIN); ?></button> | |
| 66 | -<p class="description"><?php _e('This will list the information ISC knows about the connection between images and posts.', ISCTEXTDOMAIN); ?></p> | |
| 67 | -<div id="isc-image-post-relations"></div> | |