PluginProbe
Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code / 4.0.2
Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code v4.0.2
5.5.3 3.1.0 3.2.0 3.2.1 3.3.0 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.6.0 3.7.0 3.8.0 3.8.1 3.8.2 3.8.3 4.0.0 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 All 78 releases
copy-the-code / classes / gutenberg / assets / src / utils.js

utils.js in Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code 4.0.2, at classes/gutenberg/assets/src/utils.js

20 lines 542 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { registerBlockType } from '@wordpress/blocks';
5
6 /**
7 * Function to register an individual block.
8 *
9 * @param {Object} block The block to be registered.
10 *
11 * @return {WPBlockType | undefined} The block, if it has been successfully registered;
12 * otherwise `undefined`.
13 */
14 export default function initBlock( block ) {
15 if ( ! block ) {
16 return;
17 }
18 const { metadata, settings, name } = block;
19 return registerBlockType( { name, ...metadata }, settings );
20 }