Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+10
-8
@@ -157,17 +157,19 @@ class ShowTemplate {
|
||||
|
||||
$fudge = isset( $get_footer ) ? $get_footer : $wp_footer;
|
||||
|
||||
// phpcs:disable
|
||||
if ( $fudge === $this->template || $fudge === false ) {
|
||||
echo wp_kses_post( "<!-- Active Template: {$this->template} -->\n" );
|
||||
echo "<!-- Active Template: {$this->template} -->\n";
|
||||
} else {
|
||||
echo esc_html( "<!--\n" );
|
||||
echo esc_html( "The template loader logic has chosen a different template than what was used.\n\n" );
|
||||
echo esc_html( "Chosen Template: {$this->template}\n" );
|
||||
echo esc_html( "Actual Template: $fudge\n\n" );
|
||||
echo esc_html( "This will usually occur if the template file was overriden using an action on template_redirect.\n" );
|
||||
echo esc_html( "This is a best effort guess to catch such scenarios as mentioned above but can be incorrect.\n" );
|
||||
echo esc_html( "-->\n" );
|
||||
echo "<!--\n";
|
||||
echo "The template loader logic has chosen a different template than what was used.\n\n";
|
||||
echo "Chosen Template: {$this->template}\n";
|
||||
echo "Actual Template: $fudge\n\n";
|
||||
echo "This will usually occur if the template file was overriden using an action on template_redirect.\n";
|
||||
echo "This is a best effort guess to catch such scenarios as mentioned above but can be incorrect.\n";
|
||||
echo "-->\n";
|
||||
}
|
||||
// phpcs:enable
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user