checks[] = $check; } } public function run() { $results = array(); foreach ( $this->checks as $check ) { $result = call_user_func( $check ); if ( is_array( $result ) && isset( $result['id'], $result['status'] ) ) { $results[] = $result; } } return $results; } public function diagnostics() { return array( 'wordpress' => get_bloginfo( 'version' ), 'php' => PHP_VERSION, 'woocommerce' => defined( 'WC_VERSION' ) ? WC_VERSION : null, 'multisite' => is_multisite(), 'theme' => wp_get_theme()->get( 'Name' ), 'free' => defined( 'artbees_QV_VERSION' ) ? artbees_QV_VERSION : null, 'pro' => defined( 'artbees_QV_PRO_VERSION' ) ? artbees_QV_PRO_VERSION : null, 'checks' => $this->run() ); } }