PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / trunk
Pods – Custom Content Types and Fields vtrunk
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / src / Pods / Integrations / Query_Monitor / Outputters / Constants.php
pods / src / Pods / Integrations / Query_Monitor / Outputters Last commit date
Constants.php 4 months ago Debug.php 4 months ago
Constants.php
71 lines
1 <?php
2
3 namespace Pods\Integrations\Query_Monitor\Outputters;
4
5 // Don't load directly.
6 if ( ! defined( 'ABSPATH' ) ) {
7 die( '-1' );
8 }
9
10 use QM_Collector;
11 use QM_Output_Html;
12
13 /**
14 * Class Constants
15 *
16 * @since 3.2.7
17 */
18 class Constants extends QM_Output_Html {
19
20 public function __construct( QM_Collector $collector ) {
21 parent::__construct( $collector );
22
23 add_filter( 'qm/output/menus', [ $this, 'admin_menu' ], 999 );
24 }
25
26 public function name(): string {
27 return __( 'Pods', 'pods' );
28 }
29
30 public function output(): void {
31 $data = $this->collector->get_data();
32
33 $this->before_tabular_output();
34 ?>
35 <thead>
36 <tr>
37 <th><?php esc_html_e( 'Constant Name', 'pods' ); ?></th>
38 <th><?php esc_html_e( 'Constant Value', 'pods' ); ?></th>
39 </tr>
40 </thead>
41 <tbody>
42 <?php
43 if ( ! empty( $data['constants'] ) ) {
44 foreach ( $data['constants'] as $key => $value ) {
45 ?>
46 <tr>
47 <th><?php echo esc_html( $key ); ?></th>
48 <td><?php echo esc_html( $value ); ?></td>
49 </tr>
50 <?php
51 }
52 } else {
53 ?>
54 <tr>
55 <td colspan="2" style="text-align:center !important;"><em>none</em></td>
56 </tr>
57 <?php
58 }
59 ?>
60 </tbody>
61 <tfoot>
62 <tr class="qm-items-shown qm-hide">
63 <td><?php esc_html_e( 'Constant Name', 'pods' ); ?></td>
64 <td><?php esc_html_e( 'Constant Value', 'pods' ); ?></td>
65 </tr>
66 </tfoot>
67 <?php
68 $this->after_tabular_output();
69 }
70 }
71