Skip to content

Commit

Permalink
Merge pull request #7738 from Automattic/update/wrap-question-title-i…
Browse files Browse the repository at this point in the history
…n-span

Wrap question number in `<span>` tag to facilitate translating with TranslatePress
  • Loading branch information
donnapep authored Jan 15, 2025
2 parents fbcb785 + 54058cf commit cd43d10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/update-wrap-question-title-in-span
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Wrap question numbers in `<span>` tags
2 changes: 1 addition & 1 deletion includes/class-sensei-question.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public static function get_the_question_title( $question_id ) {
$title_html = '<div class="sensei-lms-question-block__header"><h2 class="question question-title">';

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

Expand Down

0 comments on commit cd43d10

Please sign in to comment.