init
This commit is contained in:
19
wp-content/themes/flatsome/inc/blocks/uxbuilder/block.json
Normal file
19
wp-content/themes/flatsome/inc/blocks/uxbuilder/block.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "flatsome/uxbuilder",
|
||||
"category": "common",
|
||||
"supports": {
|
||||
"html": true,
|
||||
"align": false,
|
||||
"inserter": false,
|
||||
"reusable": false,
|
||||
"className": false,
|
||||
"customClassName": false,
|
||||
"defaultStylePicker": false
|
||||
},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"source": "html"
|
||||
}
|
||||
}
|
||||
}
|
21
wp-content/themes/flatsome/inc/blocks/uxbuilder/index.php
Normal file
21
wp-content/themes/flatsome/inc/blocks/uxbuilder/index.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `flatsome/uxbuilder` block.
|
||||
*
|
||||
* @package Flatsome
|
||||
*/
|
||||
|
||||
/**
|
||||
* Registers the `flatsome/uxbuilder` component and block. This block doesn't
|
||||
* need a render function because it only contains raw HTML and shortcodes.
|
||||
*/
|
||||
function flatsome_register_uxbuilder_block() {
|
||||
$path = __DIR__ . '/block.json';
|
||||
$metadata = json_decode( file_get_contents( $path ), true );
|
||||
|
||||
register_block_type(
|
||||
$metadata['name'],
|
||||
$metadata
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'flatsome_register_uxbuilder_block' );
|
Reference in New Issue
Block a user