Skip to content

Commit a439783

Browse files
authored
Merge pull request #235 from rami-elementor/i18n
Minor i18n fix
2 parents 0cb474b + 7401436 commit a439783

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

src/php/admin-menus/class-import-menu.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ protected function print_messages() {
145145
$imported,
146146
'code-snippets'
147147
),
148-
'<strong>' . number_format_i18n(( $imported ) . '</strong>',
148+
'<strong>' . number_format_i18n( $imported ) . '</strong>',
149149
);
150150

151151
printf(
152152
' <a href="%s">%s</a>',
153-
esc_url( code_snippets()->get_menu_url( 'manage' ) )
154-
esc_html__( 'Have fun!', 'code-snippets' );
153+
esc_url( code_snippets()->get_menu_url( 'manage' ) ),
154+
esc_html__( 'Have fun!', 'code-snippets' )
155155
);
156156
}
157157

src/php/class-contextual-help.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,19 @@ private function load_help_sidebar() {
7272
'https://codesnippets.pro' => __( 'Plugin Website', 'code-snippets' ),
7373
];
7474

75+
$kses = [
76+
'p' => [],
77+
'strong' => [],
78+
'a' => [ 'href' => [] ],
79+
];
80+
7581
$contents = sprintf( "<p><strong>%s</strong></p>\n", esc_html__( 'For more information:', 'code-snippets' ) );
7682

7783
foreach ( $sidebar_links as $url => $label ) {
7884
$contents .= "\n" . sprintf( '<p><a href="%s">%s</a></p>', esc_url( $url ), esc_html( $label ) );
7985
}
8086

81-
$this->screen->set_help_sidebar( wp_kses_post( $contents ) );
87+
$this->screen->set_help_sidebar( wp_kses( $contents, $kses ) );
8288
}
8389

8490
/**

src/php/cloud/class-cloud-search-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function display_rows() {
165165
<?php
166166
printf(
167167
'%s <a target="_blank" href="%s">%s</a>',
168-
esc_html__( 'Codevault:', 'code-snippets' );
168+
esc_html__( 'Codevault:', 'code-snippets' ),
169169
esc_url( sprintf( 'https://codesnippets.cloud/codevault/%s', $item->codevault ) ),
170170
esc_html( $item->codevault )
171171
);

src/php/strings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// settings-fields.php.
1616
__( 'Minify Snippet Output', 'code-snippets' );
17-
__( 'Minify snippet output by removing whitespace and optimising code to reduce load times.', 'code-snippets' );
17+
__( 'Minify snippet output by removing whitespace and optimizing code to reduce load times.', 'code-snippets' );
1818

1919
// edit.php.
2020
__( 'View Full Stylesheet', 'code-snippets' );

src/php/views/partials/list-table-notices.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@
6262
);
6363

6464
if ( isset( $result_messages[ $result ] ) ) {
65+
$result_kses = [
66+
'strong' => [],
67+
];
68+
6569
printf(
6670
'<div id="message" class="notice notice-success fade is-dismissible"><p>%s</p></div>',
67-
wp_kses_post( $result_messages[ $result ] )
71+
wp_kses( $result_messages[ $result ], $result_kses )
6872
);
6973
}

0 commit comments

Comments
 (0)