Skip to content

Commit 9464ce2

Browse files
committed
Localize Details block summary text
1 parent c5dc3d0 commit 9464ce2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

includes/create-theme/theme-locale.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ private static function get_text_replacement_patterns_for_html( $block_name ) {
123123
case 'core/cover':
124124
case 'core/media-text':
125125
return array( '/(alt=")(.*?)(")/' );
126+
case 'core/details':
127+
return array( '/(<summary[^>]*>)(.*?)(<\/summary>)/' );
126128
default:
127129
return null;
128130
}
@@ -168,6 +170,7 @@ public static function escape_text_content_of_blocks( $blocks ) {
168170
case 'core/image':
169171
case 'core/cover':
170172
case 'core/media-text':
173+
case 'core/details':
171174
$replace_content_callback = function ( $content, $pattern ) {
172175
if ( empty( $content ) ) {
173176
return;

0 commit comments

Comments
 (0)