Current Path: > home > transcarter > > www > wp-content > plugins > query-monitor > > output > html >
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
admin.php | File | 3489 bytes | July 17 2025 21:05:45. | |
assets.php | File | 8350 bytes | July 17 2025 21:05:45. | |
assets_scripts.php | File | 1408 bytes | July 17 2025 21:05:45. | |
assets_styles.php | File | 1386 bytes | July 17 2025 21:05:45. | |
block_editor.php | File | 10533 bytes | July 17 2025 21:05:45. | |
caps.php | File | 5922 bytes | July 17 2025 21:05:45. | |
conditionals.php | File | 3071 bytes | July 17 2025 21:05:45. | |
db_callers.php | File | 3930 bytes | July 17 2025 21:05:45. | |
db_components.php | File | 3841 bytes | July 17 2025 21:05:45. | |
db_dupes.php | File | 5302 bytes | July 17 2025 21:05:45. | |
db_queries.php | File | 17886 bytes | July 17 2025 21:05:45. | |
debug_bar.php | File | 2167 bytes | July 17 2025 21:05:45. | |
doing_it_wrong.php | File | 4684 bytes | July 17 2025 21:05:45. | |
environment.php | File | 8470 bytes | July 17 2025 21:05:45. | |
headers.php | File | 3422 bytes | July 17 2025 21:05:45. | |
hooks.php | File | 7284 bytes | July 17 2025 21:05:45. | |
http.php | File | 11621 bytes | July 17 2025 21:05:45. | |
languages.php | File | 5745 bytes | July 17 2025 21:05:45. | |
logger.php | File | 5926 bytes | July 17 2025 21:05:45. | |
multisite.php | File | 3876 bytes | July 17 2025 21:05:45. | |
overview.php | File | 12846 bytes | July 17 2025 21:05:45. | |
php_errors.php | File | 9418 bytes | July 17 2025 21:05:45. | |
request.php | File | 6567 bytes | July 17 2025 21:05:45. | |
theme.php | File | 8352 bytes | July 17 2025 21:05:45. | |
timing.php | File | 6259 bytes | July 17 2025 21:05:45. | |
transients.php | File | 4292 bytes | July 17 2025 21:05:45. |
<?php declare(strict_types = 1); /** * Template and theme output for HTML pages. * * @package query-monitor */ if ( ! defined( 'ABSPATH' ) ) { exit; } class QM_Output_Html_Theme extends QM_Output_Html { /** * Collector instance. * * @var QM_Collector_Theme Collector. */ protected $collector; public function __construct( QM_Collector $collector ) { parent::__construct( $collector ); add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 60 ); add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 60 ); } /** * @return string */ public function name() { return __( 'Theme', 'query-monitor' ); } /** * @return void */ public function output() { /** @var QM_Data_Theme $data */ $data = $this->collector->get_data(); if ( empty( $data->stylesheet ) ) { return; } $this->before_non_tabular_output(); echo '<section>'; echo '<h3>' . esc_html__( 'Theme', 'query-monitor' ) . '</h3>'; echo '<p>' . esc_html( $data->stylesheet ) . '</p>'; echo '<p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::output_filename( 'style.css', sprintf( '%s/style.css', $data->theme_dirs[ $data->stylesheet ] ), 0, true ); echo '</p>'; if ( $data->stylesheet_theme_json ) { echo '<p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::output_filename( 'theme.json', $data->stylesheet_theme_json, 0, true ); echo '</p>'; } if ( $data->is_child_theme ) { echo '<h3>' . esc_html__( 'Parent Theme', 'query-monitor' ) . '</h3>'; echo '<p>' . esc_html( $data->template ) . '</p>'; echo '<p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::output_filename( 'style.css', sprintf( '%s/style.css', $data->theme_dirs[ $data->template ] ), 0, true ); echo '</p>'; if ( $data->template_theme_json ) { echo '<p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::output_filename( 'theme.json', $data->template_theme_json, 0, true ); echo '</p>'; } } echo '</section>'; echo '<section>'; if ( ! empty( $data->block_template ) ) { echo '<h3>' . esc_html__( 'Block Template', 'query-monitor' ) . '</h3>'; if ( $data->block_template->wp_id ) { echo '<p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo self::build_link( QM_Util::get_site_editor_url( $data->block_template->id, 'wp_template' ), esc_html( $data->block_template->id ) ); echo '</p>'; } else { if ( self::has_clickable_links() ) { $file = sprintf( '%s/%s/%s.html', $data->theme_dirs[ $data->block_template->theme ], $data->theme_folders[ $data->block_template->type ], $data->block_template->slug ); } else { $file = ''; } echo '<p class="qm-ltr">' . self::output_filename( sprintf( '%s/%s.html', $data->theme_folders[ $data->block_template->type ], $data->block_template->slug ), $file, 0, true ) . '</p>'; // WPCS: XSS ok. } } else { echo '<h3>' . esc_html__( 'Template File', 'query-monitor' ) . '</h3>'; if ( ! empty( $data->template_path ) ) { if ( $data->is_child_theme ) { $display = $data->theme_template_file; } else { $display = $data->template_file; } if ( self::has_clickable_links() ) { $file = $data->template_path; } else { $file = ''; } echo '<p class="qm-ltr">' . self::output_filename( $display, $file, 0, true ) . '</p>'; // WPCS: XSS ok. } else { echo '<p><em>' . esc_html__( 'Unknown', 'query-monitor' ) . '</em></p>'; } } if ( ! empty( $data->template_hierarchy ) ) { echo '<h3>' . esc_html__( 'Template Hierarchy', 'query-monitor' ) . '</h3>'; echo '<ol class="qm-ltr"><li>' . implode( '</li><li>', array_map( 'esc_html', $data->template_hierarchy ) ) . '</li></ol>'; } echo '</section>'; echo '<section>'; echo '<h3>' . esc_html__( 'Template Parts', 'query-monitor' ) . '</h3>'; if ( ! empty( $data->template_parts ) ) { if ( $data->is_child_theme ) { $parts = $data->theme_template_parts; } else { $parts = $data->template_parts; } echo '<ul class="qm-ltr">'; foreach ( $parts as $filename => $display ) { echo '<li>'; if ( is_int( $filename ) ) { echo self::build_link( QM_Util::get_site_editor_url( $display ), esc_html( $display ) ); // WPCS: XSS ok. } elseif ( self::has_clickable_links() ) { echo self::output_filename( $display, $filename, 0, true ); // WPCS: XSS ok. } else { echo esc_html( $display ); } if ( $data->count_template_parts[ $filename ] > 1 ) { $count = sprintf( /* translators: %s: The number of times that a template part file was included in the page */ _nx( 'Included %s time', 'Included %s times', $data->count_template_parts[ $filename ], 'template parts', 'query-monitor' ), esc_html( number_format_i18n( $data->count_template_parts[ $filename ] ) ) ); echo '<br><span class="qm-info qm-supplemental">' . esc_html( $count ) . '</span>'; } echo '</li>'; } echo '</ul>'; } else { echo '<p><em>' . esc_html__( 'None', 'query-monitor' ) . '</em></p>'; } if ( ! empty( $data->unsuccessful_template_parts ) ) { echo '<h4>' . esc_html__( 'Not Loaded', 'query-monitor' ) . '</h4>'; echo '<ul>'; foreach ( $data->unsuccessful_template_parts as $requested ) { if ( $requested['name'] ) { echo '<li>'; $text = $requested['slug'] . '-' . $requested['name'] . '.php'; echo self::output_filename( $text, $requested['caller']['file'], $requested['caller']['line'], true ); // WPCS: XSS ok. echo '</li>'; } echo '<li>'; $text = $requested['slug'] . '.php'; echo self::output_filename( $text, $requested['caller']['file'], $requested['caller']['line'], true ); // WPCS: XSS ok. echo '</li>'; } echo '</ul>'; } echo '</section>'; if ( ! empty( $data->timber_files ) ) { echo '<section>'; echo '<h3>' . esc_html__( 'Twig Template Files', 'query-monitor' ) . '</h3>'; echo '<ul class="qm-ltr">'; foreach ( $data->timber_files as $filename ) { echo '<li>' . esc_html( $filename ) . '</li>'; } echo '</ul>'; echo '</section>'; } if ( ! empty( $data->body_class ) ) { echo '<section>'; echo '<h3>' . esc_html__( 'Body Classes', 'query-monitor' ) . '</h3>'; echo '<ul class="qm-ltr">'; foreach ( $data->body_class as $class ) { echo '<li>' . esc_html( $class ) . '</li>'; } echo '</ul>'; echo '</section>'; } $this->after_non_tabular_output(); } /** * @param array<string, mixed[]> $menu * @return array<string, mixed[]> */ public function admin_menu( array $menu ) { /** @var QM_Data_Theme $data */ $data = $this->collector->get_data(); if ( ! empty( $data->block_template ) ) { if ( $data->block_template->wp_id ) { $name = $data->block_template->id; } else { $name = sprintf( '%s/%s.html', $data->theme_folders[ $data->block_template->type ], $data->block_template->slug ); } } elseif ( isset( $data->template_file ) ) { $name = ( $data->is_child_theme ) ? $data->theme_template_file : $data->template_file; } else { $name = __( 'Unknown', 'query-monitor' ); } $menu[ $this->collector->id() ] = $this->menu( array( 'title' => esc_html( sprintf( /* translators: %s: Template file name */ __( 'Template: %s', 'query-monitor' ), $name ) ), ) ); return $menu; } /** * @param array<string, mixed[]> $menu * @return array<string, mixed[]> */ public function panel_menu( array $menu ) { if ( isset( $menu[ $this->collector->id() ] ) ) { $menu[ $this->collector->id() ]['title'] = __( 'Template', 'query-monitor' ); } return $menu; } } /** * @param array<string, QM_Output> $output * @param QM_Collectors $collectors * @return array<string, QM_Output> */ function register_qm_output_html_theme( array $output, QM_Collectors $collectors ) { if ( is_admin() ) { return $output; } $collector = QM_Collectors::get( 'response' ); if ( $collector ) { $output['response'] = new QM_Output_Html_Theme( $collector ); } return $output; } add_filter( 'qm/outputter/html', 'register_qm_output_html_theme', 70, 2 );
SILENT KILLER Tool