-
WP Bootstrap 1.1.3
Stablereleased this
2026-03-07 09:34:46 +00:00 | 0 commits to main since this releaseSecurity
- Template output escaping: Added
|esc_urlfilter to all unescaped URL outputs across 8 Twig template partials —header.html.twig,header-offcanvas.html.twig,header-transparent.html.twig,header-centered.html.twig,footer.html.twig,footer-columns.html.twig,search-form.html.twig,comment-item.html.twig. Coverssite.url,item.url,child.url,user.account_url,comment.author_url, andcomment.edit_url.
Added
- Twig escape filters (
TwigService.php): Registeredesc_html,esc_attr, andesc_urlas Twig filters with['is_safe' => ['html']]to prevent double-encoding. Complements existingwpautopandwp_kses_postfilters.
Downloads
- Template output escaping: Added
-
WP Bootstrap 1.1.2
Stablereleased this
2026-03-01 00:02:21 +00:00 | 2 commits to main since this releaseSecurity
- WidgetRenderer regex hardening: Combined two separate
preg_replacecalls for h2→h4 heading downgrade into a single regex that only matches<h2>elements with thewp-block-headingclass. The previous approach replaced all</h2>tags unconditionally, risking mismatched tags if a widget contained non-block h2 elements.
Performance
- O(n) comment tree building (
ContextBuilder): Replaced O(n²) recursive scan with a parent-indexed lookup map built in a single pass. Each recursion level now iterates only direct children instead of all comments. - Consolidated sidebar queries (
ContextBuilder): Merged three separate sidebar detection branches (is_home,is_page+sidebar,is_singularpost) into a single boolean check with onegetSidebarData()call, eliminating up to 2 redundant calls per request. - Transient caching for sidebar data (
ContextBuilder):getSidebarRecentPosts()andgetSidebarTags()results cached in WordPress transients (1 hour TTL). Invalidation hooks onsave_post(recent posts) andcreate/edit/delete_post_tag(tags).
Changed
- Hex-to-RGB consolidation (
functions.php):wp_bootstrap_hex_to_rgb()now delegates towp_bootstrap_hex_to_rgb_array()instead of duplicating hex parsing logic. Addedctype_xdigit()validation and return type hints to all color utility functions.
Downloads
- WidgetRenderer regex hardening: Combined two separate
-
WP Bootstrap 1.1.1
Stablereleased this
2026-02-28 23:14:34 +00:00 | 3 commits to main since this releaseAdded
- PHPUnit test suite: 64 unit tests covering
BlockRenderer,WidgetRenderer,NavWalker, andTemplateControllerclasses with 107 assertions. Uses PHPUnit 11 and Brain\Monkey for WordPress function mocking. - Test infrastructure:
WP_HTML_Tag_Processorfunctional stub using DOMDocument for testing block renderer HTML manipulation outside WordPress. Empty stubs forWP_BlockandWP_Widgettype hints. - Build pipeline integration: Tests run automatically before every
npm run buildviaprebuildhook (composer exec -- phpunit). - CI test job: New PHPUnit test step in Gitea CI workflow between lint and build-release. Tests must pass before release packages are built.
- Release package exclusions:
tests/,phpunit.xml.dist, and.phpunit.cache/excluded from release ZIP packages with verification step.
Downloads
- PHPUnit test suite: 64 unit tests covering
-
WP Bootstrap 1.1.0
Stablereleased this
2026-02-28 22:44:25 +00:00 | 5 commits to main since this releaseAdded
- Block Renderer (
inc/Block/BlockRenderer.php): New class that injects Bootstrap 5 classes into WordPress core block HTML output on the frontend via per-blockrender_block_{$name}filters. Handles 8 block types:core/table—.tableon<table>,.table-stripedwhen stripes style is activecore/button—.btn+.btn-{variant}or.btn-outline-{variant}mapped from WP preset color slugscore/buttons—.d-flex .flex-wrap .gap-2on button group wrappercore/image—.img-fluidon<img>for responsive imagescore/search—.input-groupon inner wrapper,.form-controlon input,.btn .btn-primaryon buttoncore/quote—.blockquoteon<blockquote>,.blockquote-footeron<cite>core/pullquote— Same blockquote treatment inside<figure>core/list—.list-group+.list-group-itemwhenis-style-list-groupblock style is selected
- Widget Renderer (
inc/Block/WidgetRenderer.php): New class that transforms sidebar widgets into Bootstrap 5 card components viadynamic_sidebar_paramsandwidget_block_contentfilters. Wraps each widget in a.card > .card-bodystructure with.card-titleheadings. Downgrades block widget<h2>headings to<h4>for proper sidebar visual hierarchy. - Widget SCSS (
src/scss/_widgets.scss): New stylesheet for sidebar widget Bootstrap styling — list-group-style list items with border separators, flush-to-card-edge list positioning, Bootstrap form-control styling for select dropdowns, search form input-group layout, tag cloud with pill badges, and secondary-color post dates. - List Group block style: New "List Group" style registered for
core/listblocks — applies Bootstrap.list-groupand.list-group-itemclasses when selected in the editor. - Single post sidebar template (
views/pages/single-sidebar.html.twig): New two-column layout for blog posts withcol-lg-8content area andcol-lg-4sidebar. Includes all single post features (meta, thumbnail, tags, post navigation, comments, more posts). "More posts" section usesrow-cols-md-2to fit the narrower column. - Extensibility:
wp_bootstrap_block_renderer_blocksfilter allows child themes to add/remove block handler mappings.
Changed
- Post template default (
inc/Template/TemplateController.php): Blog posts now render with the sidebar layout by default (single-sidebar.html.twig). Posts assigned the "Full Width" template usesingle.html.twiginstead. Template selection usesget_page_template_slug()with amatchexpression. - Sidebar data for posts (
inc/Template/ContextBuilder.php): Posts always receive sidebar data (recent posts, tags, widgets) regardless of template selection, ensuring the sidebar partial always has data available. - Widget SCSS import (
src/scss/style.scss): Added_widgetspartial import between Bootstrap Icons and custom styles.
Downloads
- Block Renderer (
-
WP Bootstrap 1.0.12
Stablereleased this
2026-02-28 20:43:41 +00:00 | 6 commits to main since this releaseFixed
- Admin bar offcanvas padding on desktop (
functions.php): Scoped the admin bar offcanvas padding fix to mobile viewports only (max-width: 991.98px) so the extra padding does not appear on wide screens where the offcanvas renders inline as a regular navbar.
Downloads
- Admin bar offcanvas padding on desktop (
-
WP Bootstrap 1.0.11
Stablereleased this
2026-02-28 20:38:55 +00:00 | 7 commits to main since this releaseChanged
- Offcanvas mobile navigation: Default header now uses
header-offcanvas.html.twiginstead ofheader.html.twig. Mobile navigation slides in as an offcanvas panel from the right instead of collapsing downward. - User avatar in offcanvas header: When logged in, the offcanvas header displays the user's Gravatar and display name linking to the WooCommerce My Account page (or WP admin profile as fallback). Falls back to the site name when logged out.
- Dark mode toggle repositioned: Moved from the offcanvas body to the offcanvas footer on mobile. Desktop toggle remains in the navbar.
Added
- User context data (
inc/Template/ContextBuilder.php): NewgetUserData()method exposinguser.logged_in,user.display_name,user.avatar, anduser.account_urlto all Twig templates.
Fixed
- Admin bar overlapping offcanvas (
functions.php): Inline CSS viawp_add_inline_style()addspadding-topmatching the admin bar height to.offcanvaswhen the admin bar is visible, preventing content overlap.
Downloads
- Offcanvas mobile navigation: Default header now uses
-
WP Bootstrap 1.0.10
Stablereleased this
2026-02-25 19:20:36 +00:00 | 8 commits to main since this releaseFixed
- Title double-encoding in Twig templates (
inc/Template/ContextBuilder.php): WordPress'sget_the_title()pre-encodes&as&. When passed to Twig with autoescape enabled, the&in&was escaped again to&#038;, rendering as literal&in the browser (e.g. "Bewerbungen & Nachrichten" instead of "Bewerbungen & Nachrichten"). Fixed by wrapping all 6get_the_title()calls withwp_specialchars_decode()to decode WordPress entities before Twig. Twig autoescape then properly re-encodes&→&. This is XSS-safe because Twig still escapes all output.
Downloads
- Title double-encoding in Twig templates (
-
WP Bootstrap 1.0.9
Stablereleased this
2026-02-19 17:26:45 +00:00 | 10 commits to main since this releasePerformance
- Color variation CSS transient caching (
functions.php):wp_bootstrap_variation_colors()now caches the generated inline CSS in a 24-hour WordPress transient keyed bywp_bootstrap_variation_css_+ an MD5 of the active stylesheet slug. Previously the palette iteration and CSS string building ran on every frontend page load. The transient is immediately invalidated onswitch_themeandsave_post_wp_global_styles, so changes made via the Design Editor are reflected instantly. - Twig template recompilation gated behind
WP_DEBUG(inc/Twig/TwigService.php):auto_reloadin the TwigEnvironmentconstructor was hardcoded totrue, causing Twig to stat every compiled template file on every request to check for source changes. Changed toWP_DEBUGso template recompilation only occurs during development. In production (WP_DEBUG = false) compiled Twig templates are served from cache without filesystem mtime checks.
Downloads
- Color variation CSS transient caching (
-
WP Bootstrap 1.0.8
Stablereleased this
2026-02-19 12:23:40 +00:00 | 11 commits to main since this releaseSecurity
- Archive XSS hardening:
ContextBuilder::getArchiveData()now wrapsget_the_archive_title()andget_the_archive_description()withwp_kses_post(). Term descriptions are user-editable by Editors and above; without sanitization an injected<script>tag would execute via the|rawfilter inarchive.html.twig - Comment author XSS hardening:
ContextBuilder::buildCommentTree()now appliesesc_html()tocomment_authorandesc_url()tocomment_author_urlat the data source, preventing injection via user-supplied comment fields - Dark mode localStorage whitelist:
getPreferredTheme()indark-mode.jsnow validates the stored theme value against['dark', 'light']before use, preventing attribute injection from a tampered localStorage value written by a third-party script - Twig escaping functions marked safe:
esc_html(),esc_attr(), andesc_url()registered inTwigServiceare now declared with['is_safe' => ['html']], preventing double-encoding if Twig autoescape is ever enabled
Changed
views/partials/comment-item.html.twig: Comment author URL now output via{{ comment.author_url|raw }}(escaped in PHP) instead of callingesc_url()from the template, keeping escaping logic in one place
Downloads
- Archive XSS hardening:
-
WP Bootstrap 1.0.7
Stablereleased this
2026-02-18 14:06:21 +00:00 | 12 commits to main since this releaseAdded
do_shortcode()registered as a Twig function inTwigService, allowing shortcodes to be rendered directly from Twig templates via{{ do_shortcode('[shortcode]') }}
Downloads
You've already forked wp-bootstrap