| @@ -15,12 +15,8 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * Currently supported are: |
| 17 | 17 | * |
| 18 | 18 | * - Activitypub\Activity\Base_Object |
| 19 | - * | |
| 20 | - * Redaction is inherited from {@see Post::is_redacted()}: `is_post_publicly_queryable()` | |
| 21 | - * already resolves an attachment's own visibility, password, post-type support, and — for | |
| 22 | - * attached media — its parent's visibility, so no attachment-specific override is needed. | |
| 23 | 19 | */ |
| 24 | 20 | class Attachment extends Post { |
| 25 | 21 | /** |
| 26 | 22 | * Generates all Media Attachments for a Post. |
| @@ -33,12 +29,10 @@ | ||
| 33 | 29 | $type = ''; |
| 34 | 30 | |
| 35 | 31 | switch ( $mime_type_parts[0] ) { |
| 36 | 32 | case 'audio': |
| 37 | - $type = 'Audio'; | |
| 38 | - break; | |
| 39 | 33 | case 'video': |
| 40 | - $type = 'Video'; | |
| 34 | + $type = 'Document'; | |
| 41 | 35 | break; |
| 42 | 36 | case 'image': |
| 43 | 37 | $type = 'Image'; |
| 44 | 38 | break; |
| @@ -45,9 +39,9 @@ | ||
| 45 | 39 | } |
| 46 | 40 | |
| 47 | 41 | $attachment = array( |
| 48 | 42 | 'type' => $type, |
| 49 | - 'url' => \wp_get_attachment_url( $this->item->ID ), | |
| 43 | + 'url' => wp_get_attachment_url( $this->item->ID ), | |
| 50 | 44 | 'mediaType' => $mime_type, |
| 51 | 45 | ); |
| 52 | 46 | |
| 53 | 47 | $alt = \get_post_meta( $this->item->ID, '_wp_attachment_image_alt', true ); |