@@ -115,12 +115,10 @@ public function __call( $method, $args ) {
115
115
);
116
116
117
117
if ( isset ( $ checkboxes [ $ method ] ) ) {
118
- echo ( new Group () )->add ( new Checkbox ( $ method , $ this ->options ->$ method ) )->add (
119
- new Label (
120
- $ method ,
121
- $ checkboxes [ $ method ]
122
- )
123
- )->render ();
118
+ echo ( new Group () )
119
+ ->add ( new Checkbox ( $ method , $ this ->options ->$ method ) )
120
+ ->add ( new Label ( $ method , $ checkboxes [ $ method ] ) )
121
+ ->render ();
124
122
} else {
125
123
$ value = ! empty ( $ this ->options ->$ method ) ? $ this ->options ->$ method : '' ;
126
124
echo ( new Text ( $ method , $ value ) )->render ();
@@ -145,7 +143,7 @@ public function has_problems(): bool {
145
143
} elseif ( 1 == count ( $ this ->options ->get_available_languages () ) ) {
146
144
/* translators: %1$s: URL to a page at WordPress.orgs */
147
145
$ format = __ (
148
- 'TNo language files are currently installed. Learn how to install various languages in WordPress by <a href="%1$s">reading more here</a>. ' ,
146
+ 'No language files are currently installed. Learn how to install various languages in WordPress by <a href="%1$s">reading more here</a>. ' ,
149
147
'multisite-language-switcher '
150
148
);
151
149
$ message = sprintf (
@@ -261,18 +259,18 @@ public function language_section(): int {
261
259
*/
262
260
public function main_section (): int {
263
261
$ map = array (
264
- 'display ' => __ ( 'Display ' , 'multisite-language-switcher ' ),
265
- 'admin_display ' => __ ( 'Admin Display ' , 'multisite-language-switcher ' ),
266
- 'sort_by_description ' => __ ( 'Sort languages ' , 'multisite-language-switcher ' ),
267
- 'output_current_blog ' => __ ( 'Current language link ' , 'multisite-language-switcher ' ),
268
- 'only_with_translation ' => __ ( 'Translation links ' , 'multisite-language-switcher ' ),
269
- 'description ' => __ ( 'Description ' , 'multisite-language-switcher ' ),
270
- 'before_output ' => __ ( 'Text/HTML before the list ' , 'multisite-language-switcher ' ),
271
- 'after_output ' => __ ( 'Text/HTML after the list ' , 'multisite-language-switcher ' ),
272
- 'before_item ' => __ ( 'Text/HTML before each item ' , 'multisite-language-switcher ' ),
273
- 'after_item ' => __ ( 'Text/HTML after each item ' , 'multisite-language-switcher ' ),
274
- 'content_filter ' => __ ( 'Available translations hint ' , 'multisite-language-switcher ' ),
275
- 'content_priority ' => __ ( 'Hint priority ' , 'multisite-language-switcher ' ),
262
+ 'display ' => esc_html__ ( 'Display ' , 'multisite-language-switcher ' ),
263
+ 'admin_display ' => esc_html__ ( 'Admin Display ' , 'multisite-language-switcher ' ),
264
+ 'sort_by_description ' => esc_html__ ( 'Sort languages ' , 'multisite-language-switcher ' ),
265
+ 'output_current_blog ' => esc_html__ ( 'Current language link ' , 'multisite-language-switcher ' ),
266
+ 'only_with_translation ' => esc_html__ ( 'Translation links ' , 'multisite-language-switcher ' ),
267
+ 'description ' => esc_html__ ( 'Description ' , 'multisite-language-switcher ' ),
268
+ 'before_output ' => esc_html__ ( 'Text/HTML before the list ' , 'multisite-language-switcher ' ),
269
+ 'after_output ' => esc_html__ ( 'Text/HTML after the list ' , 'multisite-language-switcher ' ),
270
+ 'before_item ' => esc_html__ ( 'Text/HTML before each item ' , 'multisite-language-switcher ' ),
271
+ 'after_item ' => esc_html__ ( 'Text/HTML after each item ' , 'multisite-language-switcher ' ),
272
+ 'content_filter ' => esc_html__ ( 'Available translations hint ' , 'multisite-language-switcher ' ),
273
+ 'content_priority ' => esc_html__ ( 'Hint priority ' , 'multisite-language-switcher ' ),
276
274
);
277
275
278
276
return $ this ->add_settings_fields ( $ map , 'main_section ' );
@@ -287,11 +285,11 @@ public function main_section(): int {
287
285
*/
288
286
public function advanced_section (): int {
289
287
$ map = array (
290
- 'activate_autocomplete ' => __ ( 'Autocomplete ' , 'multisite-language-switcher ' ),
291
- 'image_url ' => __ ( 'Custom URL for flag-images ' , 'multisite-language-switcher ' ),
292
- 'reference_user ' => __ ( 'Reference user ' , 'multisite-language-switcher ' ),
293
- 'exclude_current_blog ' => __ ( 'Exclude blog ' , 'multisite-language-switcher ' ),
294
- 'activate_content_import ' => __ ( 'Content import ' , 'multisite-language-switcher ' ),
288
+ 'activate_autocomplete ' => esc_html__ ( 'Autocomplete ' , 'multisite-language-switcher ' ),
289
+ 'image_url ' => esc_html__ ( 'Custom URL for flag-images ' , 'multisite-language-switcher ' ),
290
+ 'reference_user ' => esc_html__ ( 'Reference user ' , 'multisite-language-switcher ' ),
291
+ 'exclude_current_blog ' => esc_html__ ( 'Exclude blog ' , 'multisite-language-switcher ' ),
292
+ 'activate_content_import ' => esc_html__ ( 'Content import ' , 'multisite-language-switcher ' ),
295
293
);
296
294
297
295
return $ this ->add_settings_fields ( $ map , 'advanced_section ' );
0 commit comments