From e8e9eb92392b6ae2154d19a26e9b8fd9ca9930bd Mon Sep 17 00:00:00 2001 From: Kuba Birecki Date: Tue, 29 Jan 2019 11:43:09 +0100 Subject: [PATCH] Replace Polldaddy embed block with Crowdsignal (#12854) * Replace Polldaddy embed block with Crowdsignal * Remove Polldaddy from the inserter * Update core-embeds.js * Update core-embeds.js * Update core-embeds.js --- .../block-library/src/embed/core-embeds.js | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/embed/core-embeds.js b/packages/block-library/src/embed/core-embeds.js index 3a2e861e0c0aa..e5afc9b9b9b5a 100644 --- a/packages/block-library/src/embed/core-embeds.js +++ b/packages/block-library/src/embed/core-embeds.js @@ -144,6 +144,25 @@ export const others = [ }, patterns: [ /^https?:\/\/(www\.)?collegehumor\.com\/.+/i ], }, + { + name: 'core-embed/crowdsignal', + settings: { + title: 'Crowdsignal', + icon: embedContentIcon, + keywords: [ 'polldaddy' ], + transform: [ { + type: 'block', + blocks: [ 'core-embed/polldaddy' ], + transform: ( content ) => { + return createBlock( 'core-embed/crowdsignal', { + content, + } ); + }, + } ], + description: __( 'Embed Crowdsignal (formerly Polldaddy) content.' ), + }, + patterns: [ /^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i ], + }, { name: 'core-embed/dailymotion', settings: { @@ -227,13 +246,17 @@ export const others = [ patterns: [ /^http:\/\/g?i*\.photobucket\.com\/.+/i ], }, { + // Deprecated in favour of the core-embed/crowdsignal block name: 'core-embed/polldaddy', settings: { title: 'Polldaddy', icon: embedContentIcon, description: __( 'Embed Polldaddy content.' ), + supports: { + inserter: false, + }, }, - patterns: [ /^https?:\/\/(www\.)?polldaddy\.com\/.+/i ], + patterns: [], }, { name: 'core-embed/reddit',