Initial commit to github
This commit is contained in:
26
views/blocks/boilerplate/block.json
Normal file
26
views/blocks/boilerplate/block.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "acf/boilerplate",
|
||||
"title": "Block Boilerplate",
|
||||
"description": "Boilerplate code to create ACF blocks.",
|
||||
"style": [
|
||||
"file:./boiilerplate.css"
|
||||
],
|
||||
"category": "vdi-block",
|
||||
"icon": "block-default",
|
||||
"keywords": [
|
||||
"boilerplate"
|
||||
],
|
||||
"acf": {
|
||||
"mode": "preview",
|
||||
"renderTemplate": "boilerplate.php"
|
||||
},
|
||||
"supports": {
|
||||
"align": false,
|
||||
"anchor": false,
|
||||
"color": false,
|
||||
"html": false,
|
||||
"jsx": false,
|
||||
"mode": false,
|
||||
"multiple": false
|
||||
}
|
||||
}
|
||||
0
views/blocks/boilerplate/boilerplate.css
Normal file
0
views/blocks/boilerplate/boilerplate.css
Normal file
27
views/blocks/boilerplate/boilerplate.php
Normal file
27
views/blocks/boilerplate/boilerplate.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Block Name: Boilerplate
|
||||
*
|
||||
* This is the template for building your own custom blocks.
|
||||
*
|
||||
* @package BasicWP
|
||||
*/
|
||||
|
||||
namespace BasicWP;
|
||||
|
||||
$classes = 'boilerplate';
|
||||
|
||||
if ( ! $is_preview ) {
|
||||
$wrapper = get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => $classes,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$wrapper = 'class="' . $classes . '"';
|
||||
}
|
||||
?>
|
||||
|
||||
<section <?php echo esc_attr( $wrapper ); ?>>
|
||||
<!-- Your block code will go here -->
|
||||
</section>
|
||||
Reference in New Issue
Block a user