Skip to content

Commit

Permalink
Rename the Speaker block to Speaker Deck (WordPress#9727)
Browse files Browse the repository at this point in the history
  • Loading branch information
pento authored Sep 12, 2018
1 parent 87a5e2d commit 4d8981c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/block-library/src/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ const embedAttributes = {
},
};

function getEmbedBlockSettings( { title, description, icon, category = 'embed', transforms, keywords = [] } ) {
function getEmbedBlockSettings( { title, description, icon, category = 'embed', transforms, keywords = [], supports = {} } ) {
// translators: %s: Name of service (e.g. VideoPress, YouTube)
const blockDescription = description || sprintf( __( 'Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.' ), title );
return {
Expand All @@ -344,6 +344,7 @@ function getEmbedBlockSettings( { title, description, icon, category = 'embed',

supports: {
align: true,
...supports,
},

transforms,
Expand Down Expand Up @@ -693,10 +694,31 @@ export const others = [
patterns: [ /^https?:\/\/(www\.)?smugmug\.com\/.+/i ],
},
{
// Deprecated in favour of the core-embed/speaker-deck block.
name: 'core-embed/speaker',
settings: getEmbedBlockSettings( {
title: 'Speaker',
icon: embedAudioIcon,
supports: {
inserter: false,
},
} ),
patterns: [],
},
{
name: 'core-embed/speaker-deck',
settings: getEmbedBlockSettings( {
title: 'Speaker Deck',
icon: embedContentIcon,
transform: [ {
type: 'block',
blocks: [ 'core-embed/speaker' ],
transform: ( content ) => {
return createBlock( 'core-embed/speaker-deck', {
content,
} );
},
} ],
} ),
patterns: [ /^https?:\/\/(www\.)?speakerdeck\.com\/.+/i ],
},
Expand Down

0 comments on commit 4d8981c

Please sign in to comment.