Changeset 38065
- Timestamp:
- 07/15/2016 03:15:23 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-editor.js
r34254 r38065 56 56 // Generate alt fallbacks and strip tags. 57 57 if ( 'image' === props.type && ! props.alt ) { 58 props.alt = props.caption || props.title || ''; 58 if ( props.caption ) { 59 props.alt = props.caption; 60 } else if ( props.title !== props.url ) { 61 props.alt = props.title; 62 } else { 63 props.alt = ''; 64 } 65 59 66 props.alt = props.alt.replace( /<\/?[^>]+>/g, '' ); 60 67 props.alt = props.alt.replace( /[\r\n]+/g, ' ' ); … … 234 241 options, classes, shortcode, html; 235 242 243 props.type = 'image'; 236 244 props = wp.media.string.props( props, attachment ); 237 245 classes = props.classes || [];
Note: See TracChangeset
for help on using the changeset viewer.