You've already forked wp-bootstrap
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 876be4a041 | |||
| 59b79d23df | |||
| e7decbe96b |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [1.0.7] - 2026-02-18
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `do_shortcode()` registered as a Twig function in `TwigService`, allowing shortcodes to be rendered directly from Twig templates via `{{ do_shortcode('[shortcode]') }}`
|
||||||
|
|
||||||
|
## [1.0.6] - 2026-02-14
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Sidebar widgets not rendered on pages using the "Page with Sidebar" template — `ContextBuilder::build()` only populated `sidebar` context for `is_home()`, so `page-sidebar.html.twig` received no widget data
|
||||||
|
|
||||||
## [1.0.5] - 2026-02-11
|
## [1.0.5] - 2026-02-11
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -69,6 +69,14 @@ class ContextBuilder
|
|||||||
$context['sidebar'] = $this->getSidebarData();
|
$context['sidebar'] = $this->getSidebarData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sidebar data for pages/posts using the "Page with Sidebar" template.
|
||||||
|
if (is_page() || is_singular('post')) {
|
||||||
|
$slug = get_page_template_slug();
|
||||||
|
if ($slug === 'page-sidebar') {
|
||||||
|
$context['sidebar'] = $this->getSidebarData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $context;
|
return $context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,10 +132,21 @@ class TwigService
|
|||||||
return wp_kses_post($content);
|
return wp_kses_post($content);
|
||||||
}, ['is_safe' => ['html']]));
|
}, ['is_safe' => ['html']]));
|
||||||
|
|
||||||
|
$this->twig->addFunction(new TwigFunction('do_shortcode', function (string $content): string {
|
||||||
|
return do_shortcode($content);
|
||||||
|
}, ['is_safe' => ['html']]));
|
||||||
|
|
||||||
// Formatting.
|
// Formatting.
|
||||||
$this->twig->addFunction(new TwigFunction('number_format_i18n', function (float $number, int $decimals = 0): string {
|
$this->twig->addFunction(new TwigFunction('number_format_i18n', function (float $number, int $decimals = 0): string {
|
||||||
return number_format_i18n($number, $decimals);
|
return number_format_i18n($number, $decimals);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// Block template parts (allows FSE Template Editor changes to take effect).
|
||||||
|
$this->twig->addFunction(new TwigFunction('block_template_part', function (string $part): string {
|
||||||
|
ob_start();
|
||||||
|
block_template_part($part);
|
||||||
|
return ob_get_clean();
|
||||||
|
}, ['is_safe' => ['html']]));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function registerWordPressGlobals(): void
|
private function registerWordPressGlobals(): void
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Description: A modern WordPress Block Theme built from scratch with Bootstrap 5.
|
|||||||
Requires at least: 6.7
|
Requires at least: 6.7
|
||||||
Tested up to: 6.7
|
Tested up to: 6.7
|
||||||
Requires PHP: 8.3
|
Requires PHP: 8.3
|
||||||
Version: 1.0.5
|
Version: 1.0.7
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: wp-bootstrap
|
Text Domain: wp-bootstrap
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{% include 'partials/footer.html.twig' %}
|
{# block_template_part('footer') #}
|
||||||
|
{% include 'partials/footer-columns.html.twig' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{{ wp_footer() }}
|
{{ wp_footer() }}
|
||||||
|
|||||||
Reference in New Issue
Block a user