PluginProbe
Assistant – Every Day Productivity Apps / 1.5.5.1
Assistant – Every Day Productivity Apps v1.5.5.1
1.5.5.1 1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 All 72 releases
← All changes | backend/src/Data/Transformers/AttachmentTransformer.php +4 -4 0.3.0 → 1.5.5.1 View file →
@@ -22,9 +22,9 @@
22 22 $thumb_src = wp_get_attachment_image_src( $attachment->ID, 'thumbnail' );
23 23 $thumb = $thumb_src ? $thumb_src[0] : null;
24 24
25 25 $response = [
26 - 'alt' => $meta['title'],
26 + 'alt' => $meta['alt'],
27 27 'author' => get_the_author_meta( 'display_name', $attachment->post_author ),
28 28 'commentsAllowed' => 'open' === $attachment->comment_status ? true : false,
29 29 'date' => get_the_date( '', $attachment ),
30 30 'description' => $meta['description'],
@@ -44,15 +44,15 @@
44 44 'url' => $meta['url'],
45 45 'urls' => [
46 46 'medium' => $size ? $size[0] : null,
47 47 ],
48 - 'height' => $meta['height'],
49 - 'width' => $meta['width'],
48 + 'height' => isset( $meta['height'] ) ? $meta['height'] : null,
49 + 'width' => isset( $meta['width'] ) ? $meta['width'] : null,
50 50 'orientation' => isset( $meta['orientation'] ) ? $meta['orientation'] : null,
51 51 ];
52 52
53 53 // Labels
54 - $labels = $this->notations->get_labels( 'post', $attachment->ID );
54 + $labels = $this->notations->get_labels( 'attachment', $attachment->ID );
55 55 foreach ( $labels as $label ) {
56 56 $response['labels'][] = $label['label_id'];
57 57 }
58 58