v1.0.0 - Release: widget area, documentation refresh
All checks were successful
Create Release Package / PHP Lint (push) Successful in 50s
Create Release Package / Build Release (push) Successful in 1m14s

- Register sidebar widget area via register_sidebar()
- Render WordPress widgets in Twig sidebar with fallback to built-in content
- Update README.md with accurate feature counts and descriptions
- Update translation files with widget area strings
- Bump version to 1.0.0

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 18:43:09 +01:00
parent 4c808a992a
commit 5268289782
12 changed files with 155 additions and 50 deletions

View File

@@ -387,12 +387,26 @@ class ContextBuilder
/**
* Get sidebar widget data.
*
* If the 'primary-sidebar' widget area has widgets assigned,
* their rendered HTML is returned. Otherwise, fallback data
* (recent posts, tags) is provided for the default Twig sidebar.
*/
private function getSidebarData(): array
{
$widgets_active = is_active_sidebar( 'primary-sidebar' );
$widgets_html = '';
if ( $widgets_active ) {
ob_start();
dynamic_sidebar( 'primary-sidebar' );
$widgets_html = ob_get_clean();
}
return [
'recent_posts' => $this->getSidebarRecentPosts(),
'tags' => $this->getSidebarTags(),
'widgets_active' => $widgets_active,
'widgets_html' => $widgets_html,
'recent_posts' => $this->getSidebarRecentPosts(),
'tags' => $this->getSidebarTags(),
];
}