@@ -157,9 +157,9 @@ public function has_problems(): bool {
157
157
public function render (): void {
158
158
printf (
159
159
'<div class="wrap"><div class="icon32" id="icon-options-general"><br/></div><h1>%s</h1>%s<br class="clear"/><form action="options.php" method="post"><p>%s</p> ' ,
160
- __ ( 'Multisite Language Switcher Options ' , 'multisite-language-switcher ' ),
161
- $ this ->subsubsub (),
162
- __ (
160
+ esc_html__ ( 'Multisite Language Switcher Options ' , 'multisite-language-switcher ' ),
161
+ $ this ->subsubsub (), // phpcs:ignore WordPress.Security.EscapeOutput
162
+ esc_html__ (
163
163
'To achieve maximum flexibility, you have to configure each blog separately. ' ,
164
164
'multisite-language-switcher '
165
165
)
@@ -338,28 +338,32 @@ public function blog_language(): void {
338
338
$ languages = $ this ->options ->get_available_languages ();
339
339
$ selected = get_locale ();
340
340
341
+ // phpcs:ignore WordPress.Security.EscapeOutput
341
342
echo ( new Select ( 'blog_language ' , $ languages , $ selected ) )->render ();
342
343
}
343
344
344
345
/**
345
346
* Shows the select-form-field 'display'
346
347
*/
347
348
public function display (): void {
349
+ // phpcs:ignore WordPress.Security.EscapeOutput
348
350
echo ( new Select ( 'display ' , MslsLink::get_types_description (), strval ( $ this ->options ->display ) ) )->render ();
349
351
}
350
352
351
353
/**
352
354
* Shows the select-form-field 'admin_display'
353
355
*/
354
356
public function admin_display (): void {
355
- echo ( new Select (
357
+ $ select = new Select (
356
358
'admin_display ' ,
357
359
array (
358
360
MslsAdminIcon::TYPE_FLAG => __ ( 'Flag ' , 'multisite-language-switcher ' ),
359
361
MslsAdminIcon::TYPE_LABEL => __ ( 'Label ' , 'multisite-language-switcher ' ),
360
362
),
361
363
$ this ->options ->get_icon_type ()
362
- ) )->render ();
364
+ );
365
+
366
+ echo $ select ->render (); // phpcs:ignore WordPress.Security.EscapeOutput
363
367
}
364
368
365
369
/**
@@ -384,6 +388,7 @@ public function reference_user(): void {
384
388
trigger_error ( sprintf ( $ format , self ::MAX_REFERENCE_USERS ) );
385
389
}
386
390
391
+ // phpcs:ignore WordPress.Security.EscapeOutput
387
392
echo ( new Select ( 'reference_user ' , $ users , strval ( $ this ->options ->reference_user ) ) )->render ();
388
393
}
389
394
@@ -393,6 +398,7 @@ public function reference_user(): void {
393
398
* The language will be used ff there is no description.
394
399
*/
395
400
public function description (): void {
401
+ // phpcs:ignore WordPress.Security.EscapeOutput
396
402
echo ( new Text ( 'description ' , $ this ->options ->description , 40 ) )->render ();
397
403
}
398
404
@@ -408,6 +414,7 @@ public function content_priority(): void {
408
414
$ arr = array_combine ( $ temp , $ temp );
409
415
$ selected = empty ( $ this ->options ->content_priority ) ? 10 : $ this ->options ->content_priority ;
410
416
417
+ // phpcs:ignore WordPress.Security.EscapeOutput
411
418
echo ( new Select ( 'content_priority ' , $ arr , strval ( $ selected ) ) )->render ();
412
419
}
413
420
@@ -426,6 +433,7 @@ public function render_rewrite( $key ): void {
426
433
$ value = $ rewrite ['slug ' ];
427
434
}
428
435
436
+ // phpcs:ignore WordPress.Security.EscapeOutput
429
437
echo ( new Text ( "rewrite_ {$ key }" , $ value , 30 , true ) )->render ();
430
438
}
431
439
0 commit comments