Skip to content

Commit

Permalink
Added a description for the embed block - revised for Gutenberg from …
Browse files Browse the repository at this point in the history
…the codex embed description found here: https://codex.wordpress.org/Embeds

Resolves WordPress#2833
  • Loading branch information
DevinWalker committed Oct 8, 2017
1 parent bcf9ad2 commit d10a8f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,18 @@ function getEmbedBlockSettings( { title, icon, category = 'embed', transforms, k
)
);

const inspectorControls = focus && (
<InspectorControls key="inspector">
<BlockDescription>
<p>{ __( 'The Embed block allows you to easily add videos, images, tweets, audio, and other content to your content.' ) }</p>
</BlockDescription>
</InspectorControls>
);

if ( fetching ) {
return [
controls,
inspectorControls,
<div key="loading" className="wp-block-embed is-loading">
<Spinner />
<p>{ __( 'Embedding…' ) }</p>
Expand All @@ -162,6 +171,7 @@ function getEmbedBlockSettings( { title, icon, category = 'embed', transforms, k

return [
controls,
inspectorControls,
<Placeholder key="placeholder" icon={ icon } label={ label } className="wp-block-embed">
<form onSubmit={ this.doServerSideRender }>
<input
Expand Down Expand Up @@ -192,6 +202,7 @@ function getEmbedBlockSettings( { title, icon, category = 'embed', transforms, k

return [
controls,
inspectorControls,
<figure key="embed" className={ typeClassName }>
{ ( cannotPreview ) ? (
<Placeholder icon={ icon } label={ __( 'Embed URL' ) }>
Expand Down

0 comments on commit d10a8f5

Please sign in to comment.