'attachment', 'posts_per_page' => -1, 'post_parent' => $post_id, 'post_mime_type' => 'image', 'order' => 'ASC' )); ?>
'.esc_html($id->get_error_message()).'
'; exit; } } ?> $attachment) { anno_popup_images_row_display($attachment); anno_popup_images_row_edit($attachment); } ?>
'image_popup', 'post' => $post->ID); $url = add_query_arg($query_args, admin_url()); ?>
ID, 'anno_img_edit'); $description = $attachment->post_content; $caption = $attachment->post_excerpt; $alt_text = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true); $display = get_post_meta($attachment->ID, '_anno_attachment_image_display', true); if (empty($display)) { $display = 'figure'; } //@TODO worth storing all this data in a single meta row as a serialized array $label = get_post_meta($attachment->ID, '_anno_attachment_image_label', true); $copyright_statement = get_post_meta($attachment->ID, '_anno_attachment_image_copyright_statement', true); $copyright_holder = get_post_meta($attachment->ID, '_anno_attachment_image_copyright_holder', true); $license = get_post_meta($attachment->ID, '_anno_attachment_image_license', true); $url = get_post_meta($attachment->ID, '_anno_attachment_image_url', true); $file_url = wp_get_attachment_url($attachment->ID); $link = get_attachment_link($attachment->ID); $img_size = get_post_meta($attachment->ID, '_anno_attachment_image_size', true); if (!$img_size) { $img_size = 'thumbnail'; } ?>
<?php echo esc_attr($attachment->post_title); ?>
*/ ?>
_x('Thumbnail', 'size label for images', 'anno'), 'medium' => _x('Medium', 'size label for images', 'anno'), 'large' => _x('Large', 'size label for images', 'anno'), ); // For small images, we won't have any image sizes displayed. $size_displayed = false; foreach ($sizes as $size_key => $size_label) { $downsize = image_downsize($attachment->ID, $size_key); $enabled = $downsize[3]; if ($enabled) { $img_size_url = wp_get_attachment_image_src($attachment->ID, $size_key); $img_size_url = $img_size_url[0]; $size_displayed = true; } else { $img_size_url = ''; } if (!empty($img_size_url)) { ?> ID, 'full'); $img_size_url = $img_size_url[0]; if ($img_size_url) { ?>
ID, 'anno_img_list'); ?> <?php echo esc_attr($attachment->post_title); ?> post_title); ?>