mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-10 07:34:34 +00:00
9d0f2e27d06264c1ef25faad80bd7b28ad65cb54
alt attributes to images inserted from URLs
Previously, when inserting an image from a URL, leaving the `alt` field blank in the media modal would result in an image being inserted into the editor without an `alt` attribute, rather than an empty `alt`. This happened because the `props.type` would not get set in `wp.media.string.props()` — because `attachment` is undefined in this case — causing the image fallbacks to get skipped. This fixes the issue by explicitly setting `props.type` to 'image' in `wp.media.string.image()` before filling out the rest of the properties. Props ambrosey, dabnpits. Fixes #36735. git-svn-id: https://develop.svn.wordpress.org/trunk@38065 602fd350-edb4-49c9-b593-d223f7449a82
Description
No description provided
Languages
PHP
80.5%
CSS
9.4%
JavaScript
8.5%
SCSS
0.9%
HTML
0.7%