Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,10 @@
'Custom_Image_Header::set_header_image' => [null, 'choice' => 'string|array{attachment_id: int<1, max>, url: string, width: int<0, max>, height: int<0, max>}'],
'get_user' => ['($user_id is int<min, 0> ? false : \WP_User|false)'],
'get_user_by' => ["(\$field is 'id'|'ID' ? (\$value is int<min, 0> ? false : \WP_User|false) : \WP_User|false)"],
'check_admin_referer' => ['1|2|false', 'action' => '-1|string'],
'check_ajax_referer' => ['1|2|false', 'action' => '-1|string'],
'wp_verify_nonce' => ['1|2|false', 'action' => '-1|string'],
'wp_create_nonce' => [null, 'action' => '-1|string'],
'wp_nonce_url' => [null, 'action' => '-1|string'],
'wp_nonce_field' => [null, 'action' => '-1|string'],
];
9 changes: 9 additions & 0 deletions wordpress-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -111018,6 +111018,7 @@ function is_blog_installed()
* @param int|string $action Optional. Nonce action name. Default -1.
* @param string $name Optional. Nonce name. Default '_wpnonce'.
* @return string Escaped URL with nonce action added.
* @phpstan-param -1|string $action
*/
function wp_nonce_url($actionurl, $action = -1, $name = '_wpnonce')
{
Expand Down Expand Up @@ -111047,6 +111048,7 @@ function wp_nonce_url($actionurl, $action = -1, $name = '_wpnonce')
* @param bool $referer Optional. Whether to set the referer field for validation. Default true.
* @param bool $display Optional. Whether to display or return hidden form field. Default true.
* @return string Nonce field HTML markup.
* @phpstan-param -1|string $action
*/
function wp_nonce_field($action = -1, $name = '_wpnonce', $referer = \true, $display = \true)
{
Expand Down Expand Up @@ -127986,6 +127988,8 @@ function auth_redirect()
* @return int|false 1 if the nonce is valid and generated between 0-12 hours ago,
* 2 if the nonce is valid and generated between 12-24 hours ago.
* False if the nonce is invalid.
* @phpstan-param -1|string $action
* @phpstan-return 1|2|false
*/
function check_admin_referer($action = -1, $query_arg = '_wpnonce')
{
Expand All @@ -128004,6 +128008,8 @@ function check_admin_referer($action = -1, $query_arg = '_wpnonce')
* @return int|false 1 if the nonce is valid and generated between 0-12 hours ago,
* 2 if the nonce is valid and generated between 12-24 hours ago.
* False if the nonce is invalid.
* @phpstan-param -1|string $action
* @phpstan-return 1|2|false
*/
function check_ajax_referer($action = -1, $query_arg = \false, $stop = \true)
{
Expand Down Expand Up @@ -128202,6 +128208,8 @@ function wp_nonce_tick($action = -1)
* @return int|false 1 if the nonce is valid and generated between 0-12 hours ago,
* 2 if the nonce is valid and generated between 12-24 hours ago.
* False if the nonce is invalid.
* @phpstan-param -1|string $action
* @phpstan-return 1|2|false
*/
function wp_verify_nonce($nonce, $action = -1)
{
Expand All @@ -128215,6 +128223,7 @@ function wp_verify_nonce($nonce, $action = -1)
*
* @param string|int $action Scalar value to add context to the nonce.
* @return string The token.
* @phpstan-param -1|string $action
*/
function wp_create_nonce($action = -1)
{
Expand Down
Loading