'attachment', 'post_mime_type' => 'image', 'post_status' => 'inherit', 'posts_per_page' => -1, ); $images_query = new WP_Query($query_args); $images = array(); $actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; foreach ($images_query->posts as $img) { $alt = get_post_meta($img->ID, '_wp_attachment_image_alt', true); if(strlen($alt) === 0) { $img_object = array( 'id' => $img->ID, 'name' => $img->post_title, 'url' => wp_get_attachment_thumb_url($img->ID) ); $images[] = $img_object; } } if( isset($_POST['acpAddAlt']) ){ update_post_meta($_POST['thumb_id'], '_wp_attachment_image_alt', $_POST['thumb_alt']); echo ''; } ?>
|
|
|||
|
|
|||