* docs: Add onboarding documentation for new developers Add four comprehensive guides to help new developers get started with the VDI-Starter-v5 WordPress theme: - docs/getting-started.md: Setup from zero, local WordPress options, env config, theme activation warnings, troubleshooting - docs/architecture.md: Bootstrap flow, 7 architectural layers, namespace conventions, WP hooks cleanup, enqueue system, theme.json - docs/creating-blocks.md: Step-by-step ACF block creation tutorial, helper functions, parent-child patterns, Tailwind integration - docs/reference.md: Hooks/filters tables, design tokens, CSS import tree, JS module graph, class reference, CLI commands, deployment Update README.md: trim deep-dive API docs (moved to reference), add documentation links section, fix CSS paths (views/styles/ → styles/), add missing contact-info block, fix deployment filename typo (wpengine,yml → wpengine.yml), add backToTop.js and enqEditorAssets(), add namespace conventions table. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs: language graph * docs: Update readme * 🔵 other: Rename project and publish * 🔵 other: Update .gitignore
49 lines
982 B
PHP
49 lines
982 B
PHP
<?php
|
|
/**
|
|
* Block Name: Grid Cell
|
|
*
|
|
* This is the template that displays the Grid Cell block.
|
|
*
|
|
* @package SoloFrameEvo
|
|
*/
|
|
|
|
namespace SoloFrameEvo;
|
|
|
|
// Initialize variables
|
|
$className = ! empty( $block['className'] ) ? $block['className'] : '';
|
|
|
|
$span = get_field( 'col_span' );
|
|
$spanBPs = get_field( 'col_span_breakpoints' );
|
|
|
|
$className .= $className . ' grid-cell px-4 py-2';
|
|
|
|
$gridClasses = '';
|
|
|
|
// Add column span classes
|
|
if ( $span && $span !== 'auto' ) {
|
|
$gridClasses .= ' col-span-' . $span;
|
|
}
|
|
|
|
// Add breakpoint-specific column span classes
|
|
if ( $spanBPs ) {
|
|
foreach ( $spanBPs as $bp ) {
|
|
$gridClasses .= ' ' . $bp . ':col-span-' . get_field( 'col_span_' . $bp );
|
|
}
|
|
}
|
|
|
|
// Combine all classes
|
|
$className .= ' ' . trim( $gridClasses );
|
|
|
|
if ( ! $is_preview ) {
|
|
$wrapper = get_block_wrapper_attributes(
|
|
array( 'class' => trim( $className ) )
|
|
);
|
|
} else {
|
|
$wrapper = '';
|
|
}
|
|
?>
|
|
|
|
<div <?php echo wp_kses_post( $wrapper ); ?>>
|
|
<InnerBlocks className="" />
|
|
</div>
|