Skip to content

Commit

Permalink
EmbedBlock: include align class in saved markup. (#1436)
Browse files Browse the repository at this point in the history
* EmbedBlock: include align class in saved markup.

* Do not add align class if no alignment is set.
  • Loading branch information
mtias authored Jun 28, 2017
1 parent a65909d commit 9500701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ function getEmbedBlockSettings( { title, icon, category = 'embed' } ) {
},

save( { attributes } ) {
const { url, caption } = attributes;
const { url, caption, align } = attributes;
if ( ! caption || ! caption.length ) {
return url;
}

return (
<figure>{ '\n' }
<figure className={ align && `align${ align }` }>{ '\n' }
{ url }
<figcaption>{ caption }</figcaption>
</figure>
Expand Down

0 comments on commit 9500701

Please sign in to comment.