Skip to content

Commit

Permalink
Move the HTML element description map outside of the component
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Aug 15, 2023
1 parent 0fd14d1 commit 1435b5e
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions packages/block-library/src/template-part/edit/advanced-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ import { useSelect } from '@wordpress/data';
*/
import { TemplatePartImportControls } from './import-controls';

const htmlElementMessages = {
header: __(
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
),
main: __(
'The <main> element should be used for the primary content of your document only.'
),
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
article: __(
'The <article> element should represent a self-contained, syndicatable portion of the document.'
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
footer: __(
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
),
};

export function TemplatePartAdvancedControls( {
tagName,
setAttributes,
Expand Down Expand Up @@ -48,27 +69,6 @@ export function TemplatePartAdvancedControls( {
value: _area,
} ) );

const htmlElementMessages = {
header: __(
'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'
),
main: __(
'The <main> element should be used for the primary content of your document only. '
),
section: __(
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
),
article: __(
'The <article> element should represent a self-contained, syndicatable portion of the document.'
),
aside: __(
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
),
footer: __(
'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'
),
};

return (
<InspectorControls group="advanced">
{ isEntityAvailable && (
Expand Down

0 comments on commit 1435b5e

Please sign in to comment.