Compare commits

..

No commits in common. "334332a64f50562efd49139dfcd8e005ad77b443" and "18542739f76d7456d86840d84d058ed32a2da1d1" have entirely different histories.

1 changed files with 4 additions and 8 deletions

View File

@ -4,13 +4,9 @@ import './editor.scss';
import { registerBlockType } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';
const NAMESPACE = '';
const SLUG = '';
const BLOCK_TITLE= '';
registerBlockType( `${NAMESPACE}/${SLUG}`, {
title: __( BLOCK_TITLE, SLUG),
registerBlockType( '<NAMESPACE>/<SLUG>', { // FIXME replace <NAMESPACE>, <SLUG>, <BLOCK TITLE>
title: __( '<BLOCK TITLE>', '<SLUG>' ), // FIXME replace <BLOCK TITLE> ,<SLUG>
category: 'widgets',
@ -24,14 +20,14 @@ registerBlockType( `${NAMESPACE}/${SLUG}`, {
type: 'string',
source: 'text',
selector: 'p'
default: __('A default name', NAMESPACE),
default: __('A default name', '<NAMESPACE>'), // FIXME replace <NAMESPACE>
},
}
edit( { attributes, className } ) {
return (
<p className={ className }>
{ attributes.name }
{ attributes.name }
</p>
);
},