-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress.stubs
61 lines (52 loc) · 1.89 KB
/
wordpress.stubs
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
<?php
namespace {
define( 'MINUTE_IN_SECONDS', 60 );
define( 'HOUR_IN_SECONDS', 3600 );
define( 'DAY_IN_SECONDS', 86400 );
define( 'WEEK_IN_SECONDS', 604800 );
define( 'MONTH_IN_SECONDS', 2592000 );
define( 'YEAR_IN_SECONDS', 31536000 );
define( 'OBJECT', 'OBJECT' );
define( 'object', 'OBJECT' );
define( 'OBJECT_K', 'OBJECT_K' );
define( 'ARRAY_A', 'ARRAY_A' );
define( 'ARRAY_N', 'ARRAY_N' );
define( 'ABSPATH', '/wp' );
define( 'WP_CONTENT_DIR', '/wp/wp-content' );
define( 'WP_CONTENT_URL', 'http://localhost/wp-content/uploads' );
class wpdb {
/** @var string */
public $login_log_table = '';
/**
* @param string $query
* @param mixed $args
* @return string|null
*/
public function prepare( $query, ...$args ) {}
}
/**
* @param mixed $data Optional. Data to encode as JSON, then print and die. Default null.
* @param int $status_code Optional. The HTTP status code to output. Default null.
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
* @psalm-return never-returns
*/
function wp_send_json_error( $data = null, $status_code = null, $options = 0 ) {}
/**
* @param mixed $response Variable (usually an array or object) to encode as JSON,
* then print and die.
* @param int $status_code Optional. The HTTP status code to output. Default null.
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
* @psalm-return never-returns
*/
function wp_send_json( $response, $status_code = null, $options = 0 ) {}
/**
* @param string $id
* @param string $title
* @param callable $callback
* @param string $page
* @param string $section
* @psalm-param array{class?: string, label_for?: string, ...} $args
* @return void
*/
function add_settings_field( $id, $title, $callback, $page, $section = 'default', $args = array() ) {}
}