Change media details
wp_update_mediaChange the title, caption or alt text of one file in the media library (attachment); the file itself stays as it is. Only the fields passed change. Alt text is stored as plain text. Returns {updated: true, id}; an id that is not a media file returns a not-found error. Needs the right to edit that file. Title, caption and alt text can be public wherever the file is shown. A new file is added with wp_upload_media; a file's description and parent are changed with wp_update_post. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Attachment id, as wp_list_media returns it. | |
| alt | No | New alternative text for an image; an empty string clears it. When omitted, it stays as it is. | |
| title | No | New title. When omitted, it stays as it is. | |
| caption | No | New caption; an empty string clears it. When omitted, it stays as it is. |