Skip to content

Commit

Permalink
Better description for embed blocks (WordPress#6124)
Browse files Browse the repository at this point in the history
* Better description for embed blocksn

* update description

* Check based on description

* Blocks: Add a period to the description of embed
  • Loading branch information
ajitbohra authored and nuzzio committed Apr 25, 2018
1 parent c4988ea commit 7a51d7a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,13 @@ import BlockAlignmentToolbar from '../../block-alignment-toolbar';
// These embeds do not work in sandboxes
const HOSTS_NO_PREVIEWS = [ 'facebook.com' ];

function getEmbedBlockSettings( { title, icon, category = 'embed', transforms, keywords = [] } ) {
function getEmbedBlockSettings( { title, description, icon, category = 'embed', transforms, keywords = [] } ) {
return {
title,

description: __( 'The Embed block allows you to easily add videos, images, tweets, audio, and other content to your post or page.' ),

description: description || __( `Paste URLs from ${ title } to embed the content in this block.` ),
icon,

category,

keywords,

attributes: {
url: {
type: 'string',
Expand Down Expand Up @@ -266,6 +261,7 @@ export const name = 'core/embed';

export const settings = getEmbedBlockSettings( {
title: __( 'Embed' ),
description: __( 'The Embed block allows you to easily add videos, images, tweets, audio, and other content to your post or page.' ),
icon: 'embed-generic',
transforms: {
from: [
Expand Down

0 comments on commit 7a51d7a

Please sign in to comment.