Skip to content

Commit

Permalink
Change src attribute to url
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Apr 7, 2017
1 parent 9ad979c commit f93b68f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions editor/blocks/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ wp.blocks.registerBlock( 'core/image', {
category: 'common',

attributes: {
src: attr( 'img', 'src' ),
url: attr( 'img', 'src' ),
alt: attr( 'img', 'alt' ),
caption: html( 'figcaption' )
},

edit( { attributes, isSelected, setAttributes } ) {
const { src, alt, caption } = attributes;
const { url, alt, caption } = attributes;

return (
<figure>
<img src={ src } alt={ alt } />
<img src={ url } alt={ alt } />
{ caption || isSelected ? (
<Editable
tagName="figcaption"
Expand All @@ -32,11 +32,11 @@ wp.blocks.registerBlock( 'core/image', {
},

save( { attributes } ) {
const { src, alt, caption } = attributes;
const { url, alt, caption } = attributes;

return (
<figure>
<img src={ src } alt={ alt } />
<img src={ url } alt={ alt } />
{ caption ? (
<figcaption dangerouslySetInnerHTML={ { __html: caption } } />
) : null }
Expand Down

0 comments on commit f93b68f

Please sign in to comment.