Files
Portfolio-2026/views/blocks/accordion/accordion.php
T
Keith SolomonandClaude Opus 4.7 e2f6270717 Release as SoloFrame Evo (#2)
* 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
2026-07-29 15:52:21 -05:00

45 lines
1.5 KiB
PHP

<?php
/**
* Block Name: Accordion
*
* This is the template that renders the Accordion block.
*
* @package SoloFrameEvo
*/
namespace SoloFrameEvo;
$open = get_field( 'open' );
$group = get_field( 'group_items' );
$accItems = get_field( 'accordion_items' );
if ( $accItems ) :
$classes = 'accordion';
$wrapper = blockWrapperAttributes( $classes, $is_preview );
?>
<section <?php echo wp_kses_post( $wrapper ); ?>>
<?php foreach ( $accItems as $index => $item ) : ?>
<?php
$itemID = 'accordion-' . ( $index + 1 );
$isOpen = ( $index === 0 && $open ) ? 'open' : '';
?>
<details <?php echo esc_attr( $group ) ? 'name="' . esc_attr( $group ) . '"' : ''; ?> <?php echo esc_attr( $isOpen ); ?> class="accBody">
<summary class="accHeader">
<h2><?php echo esc_html( $item['title'] ); ?></h2>
<svg xmlns="http://www.w3.org/2000/svg" class="marker" fill="none" height="1rem" width="1rem" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" aria-labelledby="<?php echo esc_attr( $itemID ); ?>-title <?php echo esc_attr( $itemID ); ?>-desc">
<title id="<?php echo esc_attr( $itemID ); ?>-title">Open icon</title>
<desc id="<?php echo esc_attr( $itemID ); ?>-desc">icon that represents the state of the summary</desc>
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
</svg>
</summary>
<div id="<?php echo esc_attr( $itemID ); ?>" class="accContent">
<?php echo wp_kses_post( $item['content'] ); ?>
</div>
</details>
<?php endforeach; ?>
</section>
<?php endif; ?>