Skip to content

Commit

Permalink
Tiled gallery: remove shortcode transform (#30756)
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Feb 15, 2019
1 parent f0829fb commit 437f245
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions client/gutenberg/extensions/tiled-gallery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,53 +157,6 @@ export const settings = {
return createBlock( `jetpack/${ name }` );
},
},
{
type: 'shortcode',
tag: 'gallery',
attributes: {
// @TODO: other params: https://en.support.wordpress.com/gallery/#gallery-shortcode
images: {
type: 'array',
shortcode: ( { named: { ids } } ) => {
if ( ! ids ) {
return [];
}

return ids.split( ',' ).map( id => ( {
id: parseInt( id, 10 ),
} ) );
},
},
columns: {
type: 'number',
shortcode: ( { named: { columns = 3 } } ) => {
if ( ! columns ) {
return;
}

const result = parseInt( columns, 10 );
if ( result ) {
return result;
}
},
},
linkTo: {
type: 'string',
shortcode: ( { named: { link = 'attachment' } } ) => {
return link === 'file' ? 'media' : link;
},
},
layout: {
type: 'string',
shortcode: ( { named: { type = LAYOUT_DEFAULT } } ) => {
// @TODO: if `type=slideshow`, return a slideshow block
return LAYOUT_STYLES.map( style => style.name ).includes( type )
? type
: LAYOUT_DEFAULT;
},
},
},
},
],
to: [
{
Expand Down

0 comments on commit 437f245

Please sign in to comment.