-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathclass-query.php
69 lines (55 loc) · 1.7 KB
/
class-query.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
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
<?php
/**
* Add small screen with informations about queries of WP
*
* @package Debug Queries
* @subpackage Cache
* @author Frank Bültge
* @since 2.0.0
* @deprecated 2.1.17
*/
if ( ! function_exists( 'add_action' ) ) {
echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
exit;
}
/**
* Deprecated. Use Debug_Objects_Db_Query (class-db_query.php) instead.
*/
$msg = __( 'Class Debug_Objects_Query was replaced with Debug_Objects_Db_Query. Please re-save the settings of the Debug Objects Plugin.' );
_deprecated_file( basename( __FILE__ ), '2.1.17', 'class-db_query.php', $msg );
if ( ! class_exists( 'Debug_Objects_Query' ) ) {
class Debug_Objects_Query {
private static $classobj = NULL;
/**
* Handler for the action 'init'. Instantiates this class.
*
* @access public
* @since 2.0.0
* @return Debug_Objects_Query|null $classobj
*/
public static function init() {
if ( NULL === self::$classobj )
self::$classobj = new self;
return self::$classobj;
}
/**
* Init the message
*
*/
public function __construct() {
add_action( 'init', array( $this, 'get_message' ) );
}
/**
* Get message to inform about deprecated class
*
* @return void
*/
public function get_message() {
//$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
$msg = __( 'Class Debug_Objects_Query was replaced with Debug_Objects_Db_Query. Please re-save the settings of the Debug Objects Plugin.' );
//trigger_error( $msg, $level );
_deprecated_function( __CLASS__, '2.1.17', 'Debug_Objects_Db_Query' );
}
}
$Debug_Objects_Query = Debug_Objects_Query::init();
}