|
23 | 23 | <fieldset> |
24 | 24 | <?php foreach ( $prpl_date_formats as $prpl_format ) : ?> |
25 | 25 | <div class="prpl-radio-wrapper"> |
26 | | - <label class="prpl-custom-radio"><input type="radio" name="date_format" value="<?php echo \esc_attr( $prpl_format ); ?>" |
27 | | - <?php |
28 | | - if ( \get_option( 'date_format' ) === $prpl_format ) { // checked() uses "==" rather than "===". |
29 | | - echo " checked='checked'"; |
30 | | - $prpl_custom = false; |
31 | | - } |
32 | | - ?> |
| 26 | + <label class="prpl-custom-radio"> |
| 27 | + <input |
| 28 | + type="radio" |
| 29 | + name="date_format" |
| 30 | + value="<?php echo \esc_attr( $prpl_format ); ?>" |
| 31 | + <?php |
| 32 | + if ( \get_option( 'date_format' ) === $prpl_format ) { // checked() uses "==" rather than "===". |
| 33 | + echo " checked='checked'"; |
| 34 | + $prpl_custom = false; |
| 35 | + } |
| 36 | + ?> |
33 | 37 | /> |
34 | 38 | <span class="prpl-custom-control"></span> |
35 | 39 | <span class="date-time-text format-i18n"><?php echo \esc_html( \date_i18n( $prpl_format ) ); ?></span> |
|
43 | 47 | <label class="prpl-custom-radio"> |
44 | 48 | <input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m" <?php checked( $prpl_custom ); ?>/> |
45 | 49 | <span class="prpl-custom-control"></span> <span class="date-time-text date-time-custom-text"> |
46 | | - <?php \esc_html_e( 'Custom:', 'progress-planner' ); ?> |
47 | | - <span class="screen-reader-text"> |
48 | 50 | <?php |
| 51 | + printf( |
| 52 | + /* translators: %s: Screen reader text "enter a custom date format in the following field". */ |
| 53 | + \esc_html__( 'Custom: %s', 'progress-planner' ), |
49 | 54 | /* translators: Hidden accessibility text. */ |
50 | | - \esc_html_e( 'enter a custom date format in the following field', 'progress-planner' ); |
| 55 | + '<span class="screen-reader-text">' . \esc_html__( 'enter a custom date format in the following field', 'progress-planner' ) . '</span>' |
| 56 | + ); |
51 | 57 | ?> |
52 | | - </span> |
53 | 58 | </span> |
54 | 59 | </label> |
55 | 60 | <label for="date_format_custom" class="screen-reader-text"> |
56 | | - <?php |
57 | | - /* translators: Hidden accessibility text. */ |
58 | | - \esc_html_e( 'Custom date format:', 'progress-planner' ); |
59 | | - ?> |
| 61 | + <?php |
| 62 | + /* translators: Hidden accessibility text. */ |
| 63 | + \esc_html_e( 'Custom date format:', 'progress-planner' ); |
| 64 | + ?> |
60 | 65 | </label> |
61 | 66 | <input type="text" name="date_format_custom" id="date_format_custom" value="<?php echo \esc_attr( \get_option( 'date_format' ) ); ?>" class="small-text" /> |
62 | 67 | </div> |
63 | 68 |
|
64 | 69 | <?php /* Preview. */ ?> |
65 | 70 | <p> |
66 | | - <strong><?php \esc_html_e( 'Preview:', 'progress-planner' ); ?></strong> |
67 | | - <span class="example"><?php echo \esc_html( \date_i18n( \get_option( 'date_format' ) ) ); ?></span> |
68 | | - <span class="spinner"></span> |
| 71 | + <?php |
| 72 | + printf( |
| 73 | + /* translators: %s: Preview text. */ |
| 74 | + \wp_kses_post( \__( '<strong>Preview:</strong> %s', 'progress-planner' ) ), |
| 75 | + '<span class="example">' . \esc_html( \date_i18n( \get_option( 'date_format' ) ) ) . '</span><span class="spinner"></span>' |
| 76 | + ); |
| 77 | + ?> |
69 | 78 | </p> |
70 | 79 | </fieldset> |
71 | 80 | </div> |
|
0 commit comments