bobbingwide / oik-blocks

WordPress 5.0 blocks for oik shortcodes
https://oik-plugins.com/oik-plugins/oik-blocks
GNU General Public License v3.0
1 stars 0 forks source link

Update blocks to cater for deprecated messages in the console and add example: #31

Open bobbingwide opened 4 years ago

bobbingwide commented 4 years ago

Messages I've seen are:

wp.editor.InspectorControls is deprecated. 
Please use wp.blockEditor.InspectorControls instead.

Also the CSS class names of blocks are now prefixed block-editor-; was editor-. Some of the .scss files will need updating to ensure the blocks are correctly styled. e.g blockicon/style.css

bobbingwide commented 4 years ago

It would also be nice to implement an example for each block. The simplest way to do this is to add

example: {
},

into the registerBlockType.

This works for most block, but not for the oik-block\address block where the first display shows the HTML.

bobbingwide commented 4 years ago

The example for the Search block didn't appear to work... for some reason the build paused itself! Actually, something's a bit flaky. It works sometimes.

bobbingwide commented 2 years ago

Most, but not all of the code, has been changed to use import. eg

import { __ } from '@wordpress/i18n';

I haven't checked for deprecated messages recently.