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