From 643b4118c7921396e0f3378e6fc055ff9a56f3f3 Mon Sep 17 00:00:00 2001 From: jcvignoli Date: Sat, 4 Jan 2025 16:23:34 -0300 Subject: [PATCH 1/2] function current_user_can() has a second option parameter https://developer.wordpress.org/reference/functions/current_user_can/ --- stubs/WordPress/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/WordPress/functions.php b/stubs/WordPress/functions.php index f66e1ee..68a682d 100644 --- a/stubs/WordPress/functions.php +++ b/stubs/WordPress/functions.php @@ -317,10 +317,11 @@ function checked( $checked, $current = false, $echo = false ) { /** * @param string $capability + * @param mixed $args * * @return bool */ -function current_user_can( $capability ) { +function current_user_can( string $capability, ...$args ) { } /** From 7c597030b9312b72322eff651c4b34cc6145d9a8 Mon Sep 17 00:00:00 2001 From: jcvignoli Date: Sat, 4 Jan 2025 18:01:32 -0300 Subject: [PATCH 2/2] fixed comment and removed string declaration --- stubs/WordPress/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/WordPress/functions.php b/stubs/WordPress/functions.php index 68a682d..a298a89 100644 --- a/stubs/WordPress/functions.php +++ b/stubs/WordPress/functions.php @@ -317,11 +317,11 @@ function checked( $checked, $current = false, $echo = false ) { /** * @param string $capability - * @param mixed $args + * @param mixed ...$args * * @return bool */ -function current_user_can( string $capability, ...$args ) { +function current_user_can( $capability, ...$args ) { } /**