Skip to content

Commit cd43d10

Browse files
authored
Merge pull request #7738 from Automattic/update/wrap-question-title-in-span
Wrap question number in `<span>` tag to facilitate translating with TranslatePress
2 parents fbcb785 + 54058cf commit cd43d10

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: added
3+
4+
Wrap question numbers in `<span>` tags

includes/class-sensei-question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ public static function get_the_question_title( $question_id ) {
687687
$title_html = '<div class="sensei-lms-question-block__header"><h2 class="question question-title">';
688688

689689
// translators: %d is the question number.
690-
$title_html .= sprintf( esc_html__( '%d. ', 'sensei-lms' ), sensei_get_the_question_number() );
690+
$title_html .= '<span>' . sprintf( esc_html__( '%d. ', 'sensei-lms' ), sensei_get_the_question_number() ) . '</span>';
691691
$title_html .= esc_html( $title );
692692
$title_html .= '</h2>';
693693

0 commit comments

Comments
 (0)