mirror of
https://github.com/felixfoertsch/wordpress-dev-env.git
synced 2026-04-18 15:28:44 +02:00
Initial commit
This commit is contained in:
30
wordpress_plugins/query-monitor-extend-version-1.0/collectors/constants.php
Executable file
30
wordpress_plugins/query-monitor-extend-version-1.0/collectors/constants.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Constants collector.
|
||||
*
|
||||
* @package query-monitor-extend
|
||||
*/
|
||||
|
||||
class QMX_Collector_Constants extends QMX_Collector {
|
||||
|
||||
public $id = 'constants';
|
||||
|
||||
public function name() {
|
||||
return __( 'Constants', 'query-monitor-extend' );
|
||||
}
|
||||
|
||||
public function process() {
|
||||
|
||||
$constants = get_defined_constants( true );
|
||||
$this->data['constants'] = $constants['user'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function register_qmx_collector_constants( array $collectors, QueryMonitorExtend $qmx ) {
|
||||
$collectors['constants'] = new QMX_Collector_Constants;
|
||||
return $collectors;
|
||||
}
|
||||
|
||||
add_filter( 'qmx/collectors', 'register_qmx_collector_constants', 10, 2 );
|
||||
Reference in New Issue
Block a user