PluginProbe
Image Source Control Lite – Show Image Credits and Captions / 3.11.0
Image Source Control Lite – Show Image Credits and Captions v3.11.0
3.12.0 3.11.0 trunk 1.1 1.1.1 1.1.2 1.1.2.1 1.1.3 1.10 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.2 1.2.0.1 1.2.0.2 1.2.0.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.4.1 1.3.5 All 110 releases
image-source-control-isc / admin / templates / image-posts-list.php

image-posts-list.php in Image Source Control Lite – Show Image Credits and Captions 3.11.0, at admin/templates/image-posts-list.php

50 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Load a list of images with the posts they are displayed in.
4 *
5 * @var WP_Query $images_with_posts query with posts that have the "isc_image_posts" post meta.
6 */
7 ?>
8 <table class="widefat isc-table isc-table-debug-list" style="width: 80%;" >
9 <thead>
10 <tr>
11 <th><?php esc_html_e( 'Image', 'image-source-control-isc' ); ?></th>
12 <th><?php esc_html_e( 'Posts', 'image-source-control-isc' ); ?></th>
13 <th><?php esc_html_e( 'Actions', 'image-source-control-isc' ); ?></th>
14 </tr>
15 </thead><tbody>
16 <?php
17
18 while ( $images_with_posts->have_posts() ) :
19 $images_with_posts->the_post();
20 $_posts = get_post_meta( get_the_ID(), 'isc_image_posts', true );
21 if ( is_array( $_posts ) && count( $_posts ) > 0 ) :
22 ?>
23 <tr>
24 <td>
25 <?php edit_post_link( get_the_title(), '', '', get_the_ID() ); ?>
26 </td>
27 <td>
28 <ul>
29 <?php
30 foreach ( $_posts as $_post_id ) :
31 // skip if this is a revision.
32 if ( wp_is_post_revision( $_post_id ) ) {
33 continue;
34 }
35 ?>
36 <li><a href="<?php echo esc_url( get_edit_post_link( $_post_id ) ); ?>"><?php echo esc_html( get_the_title( $_post_id ) ); ?></a></li>
37 <?php endforeach; ?>
38 </ul>
39 </td>
40 <td>
41 <button type="button" class="button isc-button-delete-image-posts-index" data-image-id="<?php echo absint( get_the_ID() ); ?>">
42 <?php esc_html_e( 'Delete', 'image-source-control-isc' ); ?>
43 </button>
44 </td>
45 </tr>
46 <?php endif; ?>
47 <?php endwhile; ?>
48 </tbody></table>
49 <?php
50