Skip to content

Instantly share code, notes, and snippets.

View jorgefilipecosta's full-sized avatar

Jorge Costa jorgefilipecosta

View GitHub Profile
<!-- wp:image {"id":2725,"align":"left","width":310,"height":240} -->
<figure class="wp-block-image alignleft" style="width:310px"><img src="http://localhost/wp-content/uploads/2017/11/image-4.png" alt="" width="310" height="240" /></figure>
<!-- /wp:image -->
<!-- wp:quote {"style":2} -->
<blockquote class="wp-block-quote is-large">
<p>The true sign of intelligence is not knowledge but imagination</p><cite>Albert Einstein</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:list -->
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.blocks;
const circle = el( 'circle', { cx: 10, cy: 10, r: 10, fill: 'red', stroke: 'blue', strokeWidth: '10' } );
const svg = el( 'svg', { width: 20, height: 20, viewBox: '0 0 20 20'}, circle)
registerBlockType( 'acme/product', {
title: 'Product',
icon: svg,
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.blocks;
registerBlockType( 'block/inner-block-transforms', {
title: 'Test allowedBlocks',
icon: 'carrot',
category: 'common',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.blocks;
registerBlockType( 'acme/product', {
title: 'Product',
icon: {
background: '#7e70af',
src: 'carrot',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'acme/product', {
title: 'Product',
icon: {
background: '#7e70af',
src: 'carrot',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'acme/product', {
title: 'Product',
icon: {
background: '#7e70af',
foreground: '#7e70ae',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'acme/product', {
title: 'Product',
icon: {
background: '#7e70af',
foreground: '#fff',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'block/inner-block-transforms', {
title: 'Test transforms',
icon: 'carrot',
category: 'common',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'block/locking-all', {
title: 'Locking All',
icon: 'carrot',
category: 'common',
( function() {
const { registerBlockType } = wp.blocks;
const { createElement: el } = wp.element;
const { InnerBlocks } = wp.editor;
registerBlockType( 'block/id-deprecation', {
title: 'Test id deprecation',
icon: 'carrot',
category: 'common',