collector->get_data();
if ( empty( $data['switches'] ) ) {
$this->before_non_tabular_output();
$notice = __( 'No data logged.', 'query-monitor' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $this->build_notice( $notice );
$this->after_non_tabular_output();
return;
}
$this->before_tabular_output();
echo '';
echo '';
echo ' ';
echo '';
echo '# ';
echo '' . esc_html__( 'Function', 'query-monitor' ) . ' ';
echo '' . esc_html__( 'Site Switch', 'query-monitor' ) . ' ';
echo '' . esc_html__( 'Caller', 'query-monitor' ) . ' ';
echo '';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $this->build_filter( 'component', array(), __( 'Component', 'query-monitor' ) );
echo ' ';
echo '
';
if ( $row['to'] ) {
printf(
'switch_to_blog(%d)',
intval($row['new'] )
);
} else {
echo 'restore_current_blog()';
}
echo '