• v1.1.2 17728e81d9

    WP Bootstrap 1.1.2
    All checks were successful
    Create Release Package / PHP Lint (push) Successful in 1m32s
    Create Release Package / PHPUnit Tests (push) Successful in 2m35s
    Create Release Package / Build Release (push) Successful in 2m36s
    Stable

    magdev released this 2026-03-01 00:02:21 +00:00 | 2 commits to main since this release

    Security

    • WidgetRenderer regex hardening: Combined two separate preg_replace calls for h2→h4 heading downgrade into a single regex that only matches <h2> elements with the wp-block-heading class. 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_singular post) into a single boolean check with one getSidebarData() call, eliminating up to 2 redundant calls per request.
    • Transient caching for sidebar data (ContextBuilder): getSidebarRecentPosts() and getSidebarTags() results cached in WordPress transients (1 hour TTL). Invalidation hooks on save_post (recent posts) and create/edit/delete_post_tag (tags).

    Changed

    • Hex-to-RGB consolidation (functions.php): wp_bootstrap_hex_to_rgb() now delegates to wp_bootstrap_hex_to_rgb_array() instead of duplicating hex parsing logic. Added ctype_xdigit() validation and return type hints to all color utility functions.
    Downloads