@@ -421,7 +421,7 @@ protected function before_output() {
421421 )
422422 );
423423
424- echo '<svg id="qm-icon-container"> ' ;
424+ echo '<svg id="qm-icon-container"> ' . "\n" ;
425425 foreach ( (array ) glob ( $ this ->qm ->plugin_path ( 'assets/icons/*.svg ' ) ) as $ icon ) {
426426 if ( ! $ icon ) {
427427 continue ;
@@ -440,31 +440,31 @@ protected function before_output() {
440440 $ contents
441441 );
442442 }
443- echo '</svg> ' ;
443+ echo '</svg> ' . "\n" ;
444444
445- echo '<div id="query-monitor-main" data-theme="auto" class=" ' . implode ( ' ' , array_map ( 'esc_attr ' , $ class ) ) . '" dir="ltr"> ' ;
446- echo '<div id="qm-side-resizer" class="qm-resizer"></div> ' ;
447- echo '<div id="qm-title" class="qm-resizer"> ' ;
448- echo '<h1 class="qm-title-heading"> ' . esc_html__ ( 'Query Monitor ' , 'query-monitor ' ) . '</h1> ' ;
449- echo '<div class="qm-title-heading"> ' ;
450- echo '<select id="qm-title-heading-select"> ' ;
445+ echo '<div id="query-monitor-main" data-theme="auto" class=" ' . implode ( ' ' , array_map ( 'esc_attr ' , $ class ) ) . '" dir="ltr"> ' . "\n" ;
446+ echo '<div id="qm-side-resizer" class="qm-resizer"></div> ' . "\n" ;
447+ echo '<div id="qm-title" class="qm-resizer"> ' . "\n" ;
448+ echo '<h1 class="qm-title-heading"> ' . esc_html__ ( 'Query Monitor ' , 'query-monitor ' ) . '</h1> ' . "\n" ;
449+ echo '<div class="qm-title-heading"> ' . "\n" ;
450+ echo '<select id="qm-title-heading-select"> ' . "\n" ;
451451
452452 printf (
453- '<option value="%1$s">%2$s</option> ' ,
453+ '<option value="%1$s">%2$s</option> ' . "\n" ,
454454 '#qm-overview ' ,
455455 esc_html__ ( 'Overview ' , 'query-monitor ' )
456456 );
457457
458458 foreach ( $ this ->panel_menu as $ menu ) {
459459 printf (
460- '<option value="%1$s">%2$s</option> ' ,
460+ '<option value="%1$s">%2$s</option> ' . "\n" ,
461461 esc_attr ( $ menu ['href ' ] ),
462462 esc_html ( $ menu ['title ' ] )
463463 );
464464 if ( ! empty ( $ menu ['children ' ] ) ) {
465465 foreach ( $ menu ['children ' ] as $ child ) {
466466 printf (
467- '<option value="%1$s">└ %2$s</option> ' ,
467+ '<option value="%1$s">└ %2$s</option> ' . "\n" ,
468468 esc_attr ( $ child ['href ' ] ),
469469 esc_html ( $ child ['title ' ] )
470470 );
@@ -473,33 +473,33 @@ protected function before_output() {
473473 }
474474
475475 printf (
476- '<option value="%1$s">%2$s</option> ' ,
476+ '<option value="%1$s">%2$s</option> ' . "\n" ,
477477 '#qm-settings ' ,
478478 esc_html__ ( 'Settings ' , 'query-monitor ' )
479479 );
480480
481- echo '</select> ' ;
481+ echo '</select> ' . "\n" ;
482482
483483 $ settings = QueryMonitor::icon ( 'admin-generic ' );
484484 $ toggle = QueryMonitor::icon ( 'image-rotate-left ' );
485485 $ close = QueryMonitor::icon ( 'no-alt ' );
486486
487- echo '</div> ' ;
487+ echo '</div> ' . "\n" ;
488488 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
489489 echo '<button class="qm-title-button qm-button-container-settings" aria-label=" ' . esc_attr__ ( 'Settings ' , 'query-monitor ' ) . '"> ' . $ settings . '</button> ' ;
490490 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
491491 echo '<button class="qm-title-button qm-button-container-position" aria-label=" ' . esc_html__ ( 'Toggle panel position ' , 'query-monitor ' ) . '"> ' . $ toggle . '</button> ' ;
492492 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
493493 echo '<button class="qm-title-button qm-button-container-close" aria-label=" ' . esc_attr__ ( 'Close Panel ' , 'query-monitor ' ) . '"> ' . $ close . '</button> ' ;
494- echo '</div> ' ; // #qm-title
494+ echo '</div> ' . "\n" ; // #qm-title
495495
496- echo '<div id="qm-wrapper"> ' ;
497- echo '<nav id="qm-panel-menu" aria-labelledby="qm-panel-menu-caption"> ' ;
498- echo '<h2 class="qm-screen-reader-text" id="qm-panel-menu-caption"> ' . esc_html__ ( 'Query Monitor Menu ' , 'query-monitor ' ) . '</h2> ' ;
499- echo '<ul role="tablist"> ' ;
496+ echo '<div id="qm-wrapper"> ' . "\n" ;
497+ echo '<nav id="qm-panel-menu" aria-labelledby="qm-panel-menu-caption"> ' . "\n" ;
498+ echo '<h2 class="qm-screen-reader-text" id="qm-panel-menu-caption"> ' . esc_html__ ( 'Query Monitor Menu ' , 'query-monitor ' ) . '</h2> ' . "\n" ;
499+ echo '<ul role="tablist"> ' . "\n" ;
500500
501501 printf (
502- '<li role="presentation"><button role="tab" data-qm-href="%1$s">%2$s</button></li> ' ,
502+ '<li role="presentation"><button role="tab" data-qm-href="%1$s">%2$s</button></li> ' . "\n" ,
503503 '#qm-overview ' ,
504504 esc_html__ ( 'Overview ' , 'query-monitor ' )
505505 );
@@ -508,10 +508,10 @@ protected function before_output() {
508508 $ this ->do_panel_menu_item ( $ id , $ menu );
509509 }
510510
511- echo '</ul> ' ;
512- echo '</nav> ' ; // #qm-panel-menu
511+ echo '</ul> ' . "\n" ;
512+ echo '</nav> ' . "\n" ; // #qm-panel-menu
513513
514- echo '<div id="qm-panels"> ' ;
514+ echo '<div id="qm-panels"> ' . "\n" ;
515515
516516 }
517517
@@ -522,20 +522,20 @@ protected function before_output() {
522522 */
523523 protected function do_panel_menu_item ( $ id , array $ menu ) {
524524 printf (
525- '<li role="presentation"><button role="tab" data-qm-href="%1$s">%2$s</button> ' ,
525+ '<li role="presentation"><button role="tab" data-qm-href="%1$s">%2$s</button> ' . "\n" ,
526526 esc_attr ( $ menu ['href ' ] ),
527527 esc_html ( $ menu ['title ' ] )
528528 );
529529
530530 if ( ! empty ( $ menu ['children ' ] ) ) {
531- echo '<ul role="presentation"> ' ;
531+ echo '<ul role="presentation"> ' . "\n" ;
532532 foreach ( $ menu ['children ' ] as $ child_id => $ child ) {
533533 $ this ->do_panel_menu_item ( $ child_id , $ child );
534534 }
535- echo '</ul> ' ;
535+ echo '</ul> ' . "\n" ;
536536 }
537537
538- echo '</li> ' ;
538+ echo '</li> ' . "\n" ;
539539 }
540540
541541 /**
@@ -550,33 +550,33 @@ protected function after_output() {
550550 'off ' => __ ( 'Set authentication cookie ' , 'query-monitor ' ),
551551 );
552552
553- echo '<div class="qm qm-non-tabular" id="qm-settings" data-qm-state=" ' . esc_attr ( $ state ) . '"> ' ;
554- echo '<h2 class="qm-screen-reader-text"> ' . esc_html__ ( 'Settings ' , 'query-monitor ' ) . '</h2> ' ;
553+ echo '<div class="qm qm-non-tabular" id="qm-settings" data-qm-state=" ' . esc_attr ( $ state ) . '"> ' . "\n" ;
554+ echo '<h2 class="qm-screen-reader-text"> ' . esc_html__ ( 'Settings ' , 'query-monitor ' ) . '</h2> ' . "\n" ;
555555
556- echo '<div class="qm-grid"> ' ;
557- echo '<section> ' ;
558- echo '<h3> ' . esc_html__ ( 'Authentication ' , 'query-monitor ' ) . '</h3> ' ;
556+ echo '<div class="qm-grid"> ' . "\n" ;
557+ echo '<section> ' . "\n" ;
558+ echo '<h3> ' . esc_html__ ( 'Authentication ' , 'query-monitor ' ) . '</h3> ' . "\n" ;
559559
560- echo '<p> ' . esc_html__ ( 'You can set an authentication cookie which allows you to view Query Monitor output when you’re not logged in, or when you’re logged in as a different user. ' , 'query-monitor ' ) . '</p> ' ;
560+ echo '<p> ' . esc_html__ ( 'You can set an authentication cookie which allows you to view Query Monitor output when you’re not logged in, or when you’re logged in as a different user. ' , 'query-monitor ' ) . '</p> ' . "\n" ;
561561
562- echo '<p><button class="qm-auth qm-button" data-qm-text-on=" ' . esc_attr ( $ text ['on ' ] ) . '" data-qm-text-off=" ' . esc_attr ( $ text ['off ' ] ) . '"> ' . esc_html ( $ text [ $ state ] ) . '</button></p> ' ;
562+ echo '<p><button class="qm-auth qm-button" data-qm-text-on=" ' . esc_attr ( $ text ['on ' ] ) . '" data-qm-text-off=" ' . esc_attr ( $ text ['off ' ] ) . '"> ' . esc_html ( $ text [ $ state ] ) . '</button></p> ' . "\n" ;
563563
564564 $ yes = QueryMonitor::icon ( 'yes-alt ' );
565565
566566 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
567- echo '<p data-qm-state-visibility="on"> ' . $ yes . ' ' . esc_html__ ( 'Authentication cookie is set ' , 'query-monitor ' ) . '</p> ' ;
567+ echo '<p data-qm-state-visibility="on"> ' . $ yes . ' ' . esc_html__ ( 'Authentication cookie is set ' , 'query-monitor ' ) . '</p> ' . "\n" ;
568568
569- echo '</section> ' ;
569+ echo '</section> ' . "\n" ;
570570
571- echo '<section> ' ;
571+ echo '<section> ' . "\n" ;
572572
573- echo '<h3> ' . esc_html__ ( 'Editor ' , 'query-monitor ' ) . '</h3> ' ;
573+ echo '<h3> ' . esc_html__ ( 'Editor ' , 'query-monitor ' ) . '</h3> ' . "\n" ;
574574
575575 if ( ! has_filter ( 'qm/output/file_link_format ' ) ) {
576- echo '<p> ' . esc_html__ ( 'You can set your editor here, so that when you click on stack trace links the file opens in your editor. ' , 'query-monitor ' ) . '</p> ' ;
576+ echo '<p> ' . esc_html__ ( 'You can set your editor here, so that when you click on stack trace links the file opens in your editor. ' , 'query-monitor ' ) . '</p> ' . "\n" ;
577577
578578 echo '<p> ' ;
579- echo '<select id="qm-editor-select" name="qm-editor-select" class="qm-select"> ' ;
579+ echo '<select id="qm-editor-select" name="qm-editor-select" class="qm-select"> ' . "\n" ;
580580
581581 $ xdebug_format = ini_get ( 'xdebug.file_link_format ' );
582582 $ default_label = ! empty ( $ xdebug_format ) ? 'Xdebug format ' : 'None ' ;
@@ -592,41 +592,41 @@ protected function after_output() {
592592 );
593593
594594 foreach ( $ editors as $ name => $ value ) {
595- echo '<option value=" ' . esc_attr ( $ value ) . '" ' . selected ( $ value , $ editor , false ) . '> ' . esc_html ( $ name ) . '</option> ' ;
595+ echo '<option value=" ' . esc_attr ( $ value ) . '" ' . selected ( $ value , $ editor , false ) . '> ' . esc_html ( $ name ) . '</option> ' . "\n" ;
596596 }
597597
598- echo '</select> ' ;
599- echo '</p><p> ' ;
598+ echo '</select> ' . "\n" ;
599+ echo '</p><p> ' . "\n" ;
600600 echo '<button class="qm-editor-button qm-button"> ' . esc_html__ ( 'Set editor cookie ' , 'query-monitor ' ) . '</button> ' ;
601- echo '</p> ' ;
601+ echo '</p> ' . "\n" ;
602602
603603 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
604- echo '<p id="qm-editor-save-status"> ' . $ yes . ' ' . esc_html__ ( 'Saved! Reload to apply changes. ' , 'query-monitor ' ) . '</p> ' ;
604+ echo '<p id="qm-editor-save-status"> ' . $ yes . ' ' . esc_html__ ( 'Saved! Reload to apply changes. ' , 'query-monitor ' ) . '</p> ' . "\n" ;
605605 } else {
606606 printf (
607607 /* translators: %s: Name of WordPress filter */
608608 esc_html__ ( 'The file link format for your editor is set by the %s filter. ' , 'query-monitor ' ),
609609 '<code>qm/output/file_link_format</code> '
610610 );
611- echo '</p> ' ;
611+ echo '</p> ' . "\n" ;
612612 }
613613
614- echo '</section> ' ;
614+ echo '</section> ' . "\n" ;
615615
616- echo '<section> ' ;
617- echo '<h3> ' . esc_html__ ( 'Appearance ' , 'query-monitor ' ) . '</h3> ' ;
616+ echo '<section> ' . "\n" ;
617+ echo '<h3> ' . esc_html__ ( 'Appearance ' , 'query-monitor ' ) . '</h3> ' . "\n" ;
618618
619- echo '<p> ' . esc_html__ ( 'Your browser color scheme is respected by default. You can override it here. ' , 'query-monitor ' ) . '</p> ' ;
619+ echo '<p> ' . esc_html__ ( 'Your browser color scheme is respected by default. You can override it here. ' , 'query-monitor ' ) . '</p> ' . "\n" ;
620620
621- echo '<ul> ' ;
622- echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="auto" checked/> ' . esc_html_x ( 'Auto ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' ;
623- echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="light"/> ' . esc_html_x ( 'Light ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' ;
624- echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="dark"/> ' . esc_html_x ( 'Dark ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' ;
625- echo '</ul> ' ;
626- echo '</section> ' ;
627- echo '</div> ' ;
621+ echo '<ul> ' . "\n" ;
622+ echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="auto" checked/> ' . esc_html_x ( 'Auto ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' . "\n" ;
623+ echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="light"/> ' . esc_html_x ( 'Light ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' . "\n" ;
624+ echo '<li><label><input type="radio" class="qm-theme-toggle qm-radio" name="qm-theme" value="dark"/> ' . esc_html_x ( 'Dark ' , 'colour scheme ' , 'query-monitor ' ) . '</label></li> ' . "\n" ;
625+ echo '</ul> ' . "\n" ;
626+ echo '</section> ' . "\n" ;
627+ echo '</div> ' . "\n" ;
628628
629- echo '<div class="qm-boxed"> ' ;
629+ echo '<div class="qm-boxed"> ' . "\n" ;
630630 $ constants = array (
631631 'QM_DB_EXPENSIVE ' => array (
632632 'label ' => __ ( 'If an individual database query takes longer than this time to execute, it \'s considered "slow" and triggers a warning. ' , 'query-monitor ' ),
@@ -679,20 +679,20 @@ protected function after_output() {
679679 */
680680 $ constants = apply_filters ( 'qm/constants ' , $ constants );
681681
682- echo '<section> ' ;
683- echo '<h3> ' . esc_html__ ( 'Configuration ' , 'query-monitor ' ) . '</h3> ' ;
682+ echo '<section> ' . "\n" ;
683+ echo '<h3> ' . esc_html__ ( 'Configuration ' , 'query-monitor ' ) . '</h3> ' . "\n" ;
684684 echo '<p> ' ;
685685 printf (
686686 /* translators: %s: Name of the config file */
687687 esc_html__ ( 'The following PHP constants can be defined in your %s file in order to control the behavior of Query Monitor: ' , 'query-monitor ' ),
688688 '<code>wp-config.php</code> '
689689 );
690- echo '</p> ' ;
690+ echo '</p> ' . "\n" ;
691691
692- echo '<dl> ' ;
692+ echo '<dl> ' . "\n" ;
693693
694694 foreach ( $ constants as $ name => $ constant ) {
695- echo '<dt><code> ' . esc_html ( $ name ) . '</code></dt> ' ;
695+ echo '<dt><code> ' . esc_html ( $ name ) . '</code></dt> ' . "\n" ;
696696 echo '<dd> ' ;
697697 echo esc_html ( $ constant ['label ' ] );
698698
@@ -723,15 +723,15 @@ protected function after_output() {
723723 );
724724 echo '</span> ' ;
725725 }
726- echo '</dd> ' ;
726+ echo '</dd> ' . "\n" ;
727727 }
728728
729- echo '</dl> ' ;
730- echo '</section> ' ;
729+ echo '</dl> ' . "\n" ;
730+ echo '</section> ' . "\n" ;
731731
732- echo '</div> ' ;
732+ echo '</div> ' . "\n" ;
733733
734- echo '</div> ' ; // #qm-settings
734+ echo '</div> ' . "\n" ; // #qm-settings
735735
736736 /**
737737 * Fires after settings but before the panel closing tag.
@@ -743,10 +743,10 @@ protected function after_output() {
743743 */
744744 do_action ( 'qm/output/after ' , $ this , $ this ->outputters );
745745
746- echo '</div> ' ; // #qm-panels
747- echo '</div> ' ; // #qm-wrapper
748- echo '</div> ' ; // #query-monitor-main
749- echo "\n\n " ;
746+ echo '</div> ' . "\n" ; // #qm-panels
747+ echo '</div> ' . "\n" ; // #qm-wrapper
748+ echo '</div> ' . "\n" ; // #query-monitor-main
749+ echo "\n" ;
750750
751751 wp_print_inline_script_tag ( <<<JS
752752 window.addEventListener('load', function() {
0 commit comments