# plugin-detective/1.1.2/troubleshoot/api.php

Plugin Detective – Troubleshooting Conflicts, version 1.1.2. 13 lines.

- Page: https://pluginprobe.com/plugins/plugin-detective/1.1.2/code/troubleshoot/api.php
- Raw: https://pluginprobe.com/plugins/plugin-detective/1.1.2/raw/troubleshoot/api.php
- Modified: 2018-05-12T20:04:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/plugin-detective/1.1.2/code/troubleshoot/api.php#L10-L20`.

```php
<?php
// If you're here wondering why we're building our own API
// instead of using the WP REST API... we're doing it this way
// so that we can actually troubleshoot issues when the WP API
// is down (like a fatal/white-screen error for example)
// 
// We're still doing things safely, we connect to the DB directly
// authenticate requests, use nonces, and all that good stuff :)

// Initialization
require_once dirname( __FILE__ ) . '/troubleshoot.php';
$app = pd_troubleshoot();
$api = $app->api->process_request();
```
