You've already forked wp-bootstrap
v1.0.0 - Release: widget area, documentation refresh
- 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:
@@ -44,6 +44,26 @@ if ( ! function_exists( 'wp_bootstrap_setup' ) ) :
|
||||
endif;
|
||||
add_action( 'after_setup_theme', 'wp_bootstrap_setup' );
|
||||
|
||||
/**
|
||||
* Register widget areas.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
if ( ! function_exists( 'wp_bootstrap_register_sidebars' ) ) :
|
||||
function wp_bootstrap_register_sidebars() {
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Sidebar', 'wp-bootstrap' ),
|
||||
'id' => 'primary-sidebar',
|
||||
'description' => __( 'Add widgets here to appear in the sidebar.', 'wp-bootstrap' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget mb-4 %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="sidebar-heading h6 text-uppercase fw-semibold">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
}
|
||||
endif;
|
||||
add_action( 'widgets_init', 'wp_bootstrap_register_sidebars' );
|
||||
|
||||
/**
|
||||
* Enqueue theme scripts and styles.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user