Skip to content

Commit

Permalink
Add ability to transform [audio] shortcodes to aidio blocks (#14045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahid F. Mohit authored and youknowriad committed Mar 20, 2019
1 parent f2308b2 commit 1c10d24
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/block-library/src/audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,36 @@ export const settings = {
return block;
},
},
{
type: 'shortcode',
tag: 'audio',
attributes: {
src: {
type: 'string',
shortcode: ( { named: { src } } ) => {
return src;
},
},
loop: {
type: 'string',
shortcode: ( { named: { loop } } ) => {
return loop;
},
},
autoplay: {
type: 'srting',
shortcode: ( { named: { autoplay } } ) => {
return autoplay;
},
},
preload: {
type: 'string',
shortcode: ( { named: { preload } } ) => {
return preload;
},
},
},
},
],
},

Expand Down

0 comments on commit 1c10d24

Please sign in to comment.