v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
All checks were successful
Create Release Package / PHP Lint (push) Successful in 52s
Create Release Package / Build Release (push) Successful in 1m21s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 16:27:13 +01:00
parent cc8dc9d357
commit eb5ac6f7ad
33 changed files with 1270 additions and 39 deletions

View File

@@ -91,6 +91,49 @@ if ( ! function_exists( 'wp_bootstrap_enqueue_scripts' ) ) :
endif;
add_action( 'wp_enqueue_scripts', 'wp_bootstrap_enqueue_scripts' );
/**
* Preload critical fonts for performance.
*
* @since 0.3.0
*/
if ( ! function_exists( 'wp_bootstrap_preload_fonts' ) ) :
function wp_bootstrap_preload_fonts() {
$fonts = array(
'inter/InterVariable.woff2',
'lora/Lora-VariableFont.woff2',
);
$base = get_template_directory_uri() . '/assets/fonts/';
foreach ( $fonts as $font ) {
printf(
'<link rel="preload" href="%s" as="font" type="font/woff2" crossorigin>' . "\n",
esc_url( $base . $font )
);
}
}
endif;
add_action( 'wp_head', 'wp_bootstrap_preload_fonts', 1 );
/**
* Enqueue RTL stylesheet for right-to-left languages.
*
* @since 0.3.0
*/
if ( ! function_exists( 'wp_bootstrap_rtl_styles' ) ) :
function wp_bootstrap_rtl_styles() {
if ( ! is_rtl() ) {
return;
}
$theme_version = wp_get_theme()->get( 'Version' );
wp_enqueue_style(
'wp-bootstrap-rtl',
get_template_directory_uri() . '/assets/css/rtl.css',
array( 'wp-bootstrap-style' ),
$theme_version
);
}
endif;
add_action( 'wp_enqueue_scripts', 'wp_bootstrap_rtl_styles', 20 );
/**
* Enqueue Bootstrap JS in the block editor for interactive previews.
*
@@ -262,7 +305,7 @@ if ( ! function_exists( 'wp_bootstrap_block_styles' ) ) :
'name' => 'list-unstyled',
'label' => __( 'Unstyled', 'wp-bootstrap' ),
'inline_style' => '
ul.is-style-list-unstyled, ol.is-style-list-unstyled { list-style: none; padding-left: 0; }',
ul.is-style-list-unstyled, ol.is-style-list-unstyled { list-style: none; padding-inline-start: 0; }',
) );
// core/group - Card.
@@ -342,7 +385,7 @@ if ( ! function_exists( 'wp_bootstrap_block_styles' ) ) :
'name' => 'blockquote-accent',
'label' => __( 'Accent Border', 'wp-bootstrap' ),
'inline_style' => '
.is-style-blockquote-accent { border-left: 4px solid var(--wp--preset--color--primary); background: var(--wp--preset--color--light); padding: var(--wp--preset--spacing--30); border-radius: 0 0.375rem 0.375rem 0; }',
.is-style-blockquote-accent { border-inline-start: 4px solid var(--wp--preset--color--primary); background: var(--wp--preset--color--light); padding: var(--wp--preset--spacing--30); border-start-start-radius: 0; border-start-end-radius: 0.375rem; border-end-end-radius: 0.375rem; border-end-start-radius: 0; }',
) );
// core/image - Shadow.