feature: Scaffold contact info block

This commit is contained in:
Keith Solomon
2025-11-11 15:07:28 -06:00
parent 4312130329
commit 6ece64abd1
3 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
{
"name": "acf/contact-info",
"title": "Contact Info Block",
"description": "Show contact information with icons and optional form.",
"style": [
"file:./contact-info.css"
],
"category": "vdi-block",
"icon": "feedback",
"keywords": [
"contact info",
"contact form"
],
"acf": {
"mode": "auto",
"renderTemplate": "contact-info.php"
},
"supports": {
"align": true,
"anchor": true,
"color": false,
"html": false,
"jsx": true,
"mode": true,
"multiple": false
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* Block Name: Contact Info
*
* Display contact information from global fields with icons and optional form.
*
* @package BasicWP
*/
namespace BasicWP;
$classes = 'contact-info';
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>