Skip to content

Commit

Permalink
revert loading, we need QM
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jul 11, 2019
1 parent 9956bf5 commit 3ef2728
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"autoload": {
"files": [
"QM_Collector_WPBP_Debug.php", "QM_Collector_WPBP_Debug_Output.php", "debug.php"
"debug.php"
]
}
}
6 changes: 6 additions & 0 deletions debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class WPBP_Debug {
*/
public function __construct( $title ) {
if ( class_exists( 'QM_Collectors' ) ) {
if ( !class_exists( 'QM_Collector_WPBP_Debug' ) ) {
include 'QM_Collector_WPBP_Debug.php';
}
$this->title = $title;
$this->output = array();

Expand All @@ -39,6 +42,9 @@ public function __construct( $title ) {
* @return array
*/
public function load (array $output, QM_Collectors $collectors ) {
if( !class_exists('QM_Collector_WPBP_Debug_Output') ) {
include 'QM_Collector_WPBP_Debug_Output.php';
}
$id = strtolower( str_replace( ' ', '_', $this->title ) );
if ( $collector = QM_Collectors::get( $id ) ) {
$output[ $id ] = new QM_Collector_WPBP_Debug_Output( $collector, $this->output, $this->title );
Expand Down

0 comments on commit 3ef2728

Please sign in to comment.