-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompat.php
More file actions
105 lines (95 loc) · 2.56 KB
/
Copy pathcompat.php
File metadata and controls
105 lines (95 loc) · 2.56 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* Code that exists for compat reasons
*
* @since 1.0.0
*
* @copyright Copyright (c) 2026, Drew Jaynes
* @copyright Copyright (c) 2011-2024, Daryl Koopersmith
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
use DebugBarConsole\Integration;
use DebugBarConsole\Panel;
use DebugBarConsole\PanelAjax;
// Bail if accessed directly
if (! defined('ABSPATH')) {
exit;
}
/**
* Globally-namespaced panel class.
*
* This Debug_Bar_Console class alias solely still exists today to mitigate for
* Debug Bar's incompatibility with namespaced panel class names. If/when
* namespace support is added upstream, this class will be deprecated and removed.
*
* @since 1.0.0 Relocated to compat.php
* @since 0.1
*/
class Debug_Bar_Console extends Panel
{
/**
* Legacy panel AJAX callback.
*
* @since 1.0.0 Reloated to compat.php
* @since 0.1
*/
public function ajax()
{
_deprecated_function(
__METHOD__,
'1.0.0',
PanelAjax::class.'::printOutput(). Scheduled for removal in Debug Bar Console v2.0.0.'
);
(new PanelAjax)->printOutput();
}
public function print_mysql_table($data, $query = '')
{
_deprecated_function(
__METHOD__,
'1.0.0',
PanelAjax::class.'::printMySqlTable(). Scheduled for removal in Debug Bar Console v2.0.0.'
);
// Invoke protected printMySqlTable() method.
(new ReflectionClass(PanelAjax::class))->getMethod('printMySqlTable')
->invoke(new PanelAjax, $data, $query);
}
}
/**
* Legacy panel registration callback.
*
* This function will be removed in 2.0.0
*
* @deprecated since 1.0.0, see Integration::registerPanel().
* @since 1.0.0 Relocated to compat.php
* @since 0.1
*
* @return array
*/
function debug_bar_console_panel($panels)
{
_deprecated_function(
__FUNCTION__,
'1.0.0',
Integration::class.'::registerPanel(). Scheduled for removal in Debug Bar Console v2.0.0.'
);
return array_merge($panels, [new Debug_Bar_Console]);
}
/**
* Legacy panel scripts register/enqueue callback.
*
* This function will be removed in 2.0.0
*
* @deprecated since 1.0.0, see Integration::registerScripts().
* @since 1.0.0 Relocated to compat.php
* @since 0.1
*
* @return void
*/
function debug_bar_console_scripts()
{
_deprecated_function(
__FUNCTION__,
'1.0.0',
Integration::class.'::registerScripts(). Scheduled for removal in Debug Bar Console v2.0.0.'
);
}