-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp-api-debug.php
32 lines (26 loc) · 899 Bytes
/
http-api-debug.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*
Plugin Name: HTTP API Debug
Plugin Group: Utilities
Plugin URI: https://github.com/webdeveric/http-api-debug
Author: Eric King
Author URI: https://github.com/webdeveric/
Description: Debug HTTP request
Version: 0.1.3
*/
defined('ABSPATH') || exit;
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
if (is_admin()) {
function http_api_debug_requirements_not_met()
{
echo '<div class="error"><p>PHP 5.3+ is required for HTTP API Debug. You have PHP ', PHP_VERSION, ' installed. This plugin has been deactivated.</p></div>';
deactivate_plugins(plugin_basename(__FILE__));
unset($_GET['activate']);
}
add_action( 'admin_notices', 'http_api_debug_requirements_not_met' );
}
return;
}
define('HTTP_API_DEBUG_FILE', __FILE__);
define('HTTP_API_DEBUG_VERSION', '0.1.3');
include dirname(__FILE__) . '/main.php';