From 49e7f6f1e421be3e0bfaeee9b28223ad0484a078 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 7 Jul 2026 20:13:29 +0100 Subject: [PATCH 1/9] Tighten the documented types in `WP_Hook`. --- src/wp-includes/class-wp-hook.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index 2ce6ee0a17648..16035f4fc8710 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -14,15 +14,21 @@ * * @see Iterator * @see ArrayAccess + * + * @phpstan-type WP_Hook_Callback array{ + * function: callable, + * accepted_args: int, + * } */ #[AllowDynamicProperties] final class WP_Hook implements Iterator, ArrayAccess { /** - * Hook callbacks. + * Hook callbacks keyed by priority. * * @since 4.7.0 * @var array + * @phpstan-var array> */ public $callbacks = array(); @@ -30,7 +36,7 @@ final class WP_Hook implements Iterator, ArrayAccess { * Priorities list. * * @since 6.4.0 - * @var array + * @var list */ protected $priorities = array(); @@ -38,7 +44,7 @@ final class WP_Hook implements Iterator, ArrayAccess { * The priority keys of actively running iterations of a hook. * * @since 4.7.0 - * @var array + * @var array> */ private $iterations = array(); @@ -46,7 +52,7 @@ final class WP_Hook implements Iterator, ArrayAccess { * The current priority of actively running iterations of a hook. * * @since 4.7.0 - * @var array + * @var array */ private $current_priority = array(); @@ -439,10 +445,11 @@ public function current_priority() { * @since 4.7.0 * * @param array $filters Filters to normalize. See documentation above for details. - * @return WP_Hook[] Array of normalized filters. + * @phpstan-param array>> $filters + * @return array Array of normalized filters keyed by hook name. */ public static function build_preinitialized_hooks( $filters ) { - /** @var WP_Hook[] $normalized */ + /** @var array $normalized */ $normalized = array(); foreach ( $filters as $hook_name => $callback_groups ) { @@ -492,6 +499,7 @@ public function offsetExists( $offset ) { * * @param mixed $offset The offset to retrieve. * @return mixed If set, the value at the specified offset, null otherwise. + * @phpstan-return array|null */ #[ReturnTypeWillChange] public function offsetGet( $offset ) { @@ -541,7 +549,8 @@ public function offsetUnset( $offset ) { * * @link https://www.php.net/manual/en/iterator.current.php * - * @return array Of callbacks at current priority. + * @return array|false Array of callbacks at current priority, false if there are no more elements. + * @phpstan-return array|false */ #[ReturnTypeWillChange] public function current() { @@ -555,7 +564,8 @@ public function current() { * * @link https://www.php.net/manual/en/iterator.next.php * - * @return array Of callbacks at next priority. + * @return array|false Array of callbacks at next priority, false if there are no more elements. + * @phpstan-return array|false */ #[ReturnTypeWillChange] public function next() { @@ -569,7 +579,7 @@ public function next() { * * @link https://www.php.net/manual/en/iterator.key.php * - * @return mixed Returns current priority on success, or NULL on failure + * @return int|null Returns current priority on success, or NULL on failure */ #[ReturnTypeWillChange] public function key() { From 6e10867dd4ac6d1420aef8d992fad255c3c9e879 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 7 Jul 2026 21:07:43 +0100 Subject: [PATCH 2/9] Naming. --- src/wp-includes/class-wp-hook.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index 16035f4fc8710..2a5825b499cef 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -15,7 +15,7 @@ * @see Iterator * @see ArrayAccess * - * @phpstan-type WP_Hook_Callback array{ + * @phpstan-type Hook_Callback array{ * function: callable, * accepted_args: int, * } @@ -28,7 +28,7 @@ final class WP_Hook implements Iterator, ArrayAccess { * * @since 4.7.0 * @var array - * @phpstan-var array> + * @phpstan-var array> */ public $callbacks = array(); @@ -445,7 +445,7 @@ public function current_priority() { * @since 4.7.0 * * @param array $filters Filters to normalize. See documentation above for details. - * @phpstan-param array>> $filters + * @phpstan-param array>> $filters * @return array Array of normalized filters keyed by hook name. */ public static function build_preinitialized_hooks( $filters ) { @@ -499,7 +499,7 @@ public function offsetExists( $offset ) { * * @param mixed $offset The offset to retrieve. * @return mixed If set, the value at the specified offset, null otherwise. - * @phpstan-return array|null + * @phpstan-return array|null */ #[ReturnTypeWillChange] public function offsetGet( $offset ) { @@ -550,7 +550,7 @@ public function offsetUnset( $offset ) { * @link https://www.php.net/manual/en/iterator.current.php * * @return array|false Array of callbacks at current priority, false if there are no more elements. - * @phpstan-return array|false + * @phpstan-return array|false */ #[ReturnTypeWillChange] public function current() { @@ -565,7 +565,7 @@ public function current() { * @link https://www.php.net/manual/en/iterator.next.php * * @return array|false Array of callbacks at next priority, false if there are no more elements. - * @phpstan-return array|false + * @phpstan-return array|false */ #[ReturnTypeWillChange] public function next() { From 67f3a9bc7e9d658328c6ab13115f54d3e62fbc48 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 7 Jul 2026 14:03:03 -0700 Subject: [PATCH 3/9] Document the `Iterator`/`ArrayAccess` generics and tighten the offset types. As an `ArrayAccess` object, the offsets of `WP_Hook` are hook priorities, which are always integers (or null when appending via `offsetSet()`), and the values are the `Hook_Callback` groups keyed by unique function ID. Co-Authored-By: Claude Fable 5 --- src/wp-includes/class-wp-hook.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index 2a5825b499cef..38895c87f1349 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -19,6 +19,9 @@ * function: callable, * accepted_args: int, * } + * + * @phpstan-implements Iterator> + * @phpstan-implements ArrayAccess> */ #[AllowDynamicProperties] final class WP_Hook implements Iterator, ArrayAccess { @@ -482,7 +485,7 @@ public static function build_preinitialized_hooks( $filters ) { * * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php * - * @param mixed $offset An offset to check for. + * @param int $offset An offset to check for. * @return bool True if the offset exists, false otherwise. */ #[ReturnTypeWillChange] @@ -497,8 +500,8 @@ public function offsetExists( $offset ) { * * @link https://www.php.net/manual/en/arrayaccess.offsetget.php * - * @param mixed $offset The offset to retrieve. - * @return mixed If set, the value at the specified offset, null otherwise. + * @param int $offset The offset to retrieve. + * @return array|null If set, the value at the specified offset, null otherwise. * @phpstan-return array|null */ #[ReturnTypeWillChange] @@ -513,8 +516,9 @@ public function offsetGet( $offset ) { * * @link https://www.php.net/manual/en/arrayaccess.offsetset.php * - * @param mixed $offset The offset to assign the value to. - * @param mixed $value The value to set. + * @param int|null $offset The offset to assign the value to. + * @param array $value The value to set. + * @phpstan-param array $value */ #[ReturnTypeWillChange] public function offsetSet( $offset, $value ) { @@ -534,7 +538,7 @@ public function offsetSet( $offset, $value ) { * * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php * - * @param mixed $offset The offset to unset. + * @param int $offset The offset to unset. */ #[ReturnTypeWillChange] public function offsetUnset( $offset ) { From b0d8b59476800f371ed7b52016bc8ec0b4d752d8 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 7 Jul 2026 14:08:28 -0700 Subject: [PATCH 4/9] Tighten the remaining documented types and fix PHPStan level 10 errors. Add `@return void` to the methods lacking return values, document the callback `$args` arrays as `list`, and narrow the `$callback` params of `remove_filter()`/`has_filter()` to `callable`, matching `add_filter()`. In `has_filter()`, pass `0` instead of `false` to `_wp_filter_build_unique_id()`, matching its `int $priority` param. In `apply_filters()`, assign the current priority to a local variable before storing it, and bail from the loop in the (impossible) case that `current()` returns `false`, since `$current_priority` only ever holds integers. Co-Authored-By: Claude Fable 5 --- src/wp-includes/class-wp-hook.php | 46 +++++++++++++++++++------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index 38895c87f1349..28da8d72d4304 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -87,6 +87,7 @@ final class WP_Hook implements Iterator, ArrayAccess { * and functions with the same priority are executed in the order * in which they were added to the filter. * @param int $accepted_args The number of arguments the function accepts. + * @return void */ public function add_filter( $hook_name, $callback, $priority, $accepted_args ) { if ( null === $priority ) { @@ -126,6 +127,7 @@ public function add_filter( $hook_name, $callback, $priority, $accepted_args ) { * for no priority being added. * @param bool $priority_existed Optional. Flag for whether the priority already existed before the new * filter was added. Default false. + * @return void */ private function resort_active_iterations( $new_priority = false, $priority_existed = false ) { $new_priorities = $this->priorities; @@ -195,11 +197,11 @@ private function resort_active_iterations( $new_priority = false, $priority_exis * * @since 4.7.0 * - * @param string $hook_name The filter hook to which the function to be removed is hooked. - * @param callable|string|array $callback The callback to be removed from running when the filter is applied. - * This method can be called unconditionally to speculatively remove - * a callback that may or may not exist. - * @param int $priority The exact priority used when adding the original filter callback. + * @param string $hook_name The filter hook to which the function to be removed is hooked. + * @param callable $callback The callback to be removed from running when the filter is applied. + * This method can be called unconditionally to speculatively remove + * a callback that may or may not exist. + * @param int $priority The exact priority used when adding the original filter callback. * @return bool Whether the callback existed before it was removed. */ public function remove_filter( $hook_name, $callback, $priority ) { @@ -237,11 +239,11 @@ public function remove_filter( $hook_name, $callback, $priority ) { * @since 4.7.0 * @since 6.9.0 Added the `$priority` parameter. * - * @param string $hook_name Optional. The name of the filter hook. Default empty. - * @param callable|string|array|false $callback Optional. The callback to check for. - * This method can be called unconditionally to speculatively check - * a callback that may or may not exist. Default false. - * @param int|false $priority Optional. The specific priority at which to check for the callback. + * @param string $hook_name Optional. The name of the filter hook. Default empty. + * @param callable|false $callback Optional. The callback to check for. + * This method can be called unconditionally to speculatively check + * a callback that may or may not exist. Default false. + * @param int|false $priority Optional. The specific priority at which to check for the callback. * Default false. * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has * anything registered. When checking a specific function, the priority @@ -254,7 +256,7 @@ public function has_filter( $hook_name = '', $callback = false, $priority = fals return $this->has_filters(); } - $function_key = _wp_filter_build_unique_id( $hook_name, $callback, false ); + $function_key = _wp_filter_build_unique_id( $hook_name, $callback, 0 ); if ( ! $function_key ) { return false; @@ -296,6 +298,7 @@ public function has_filters() { * @since 4.7.0 * * @param int|false $priority Optional. The priority number to remove. Default false. + * @return void */ public function remove_all_filters( $priority = false ) { if ( ! $this->callbacks ) { @@ -320,9 +323,9 @@ public function remove_all_filters( $priority = false ) { * * @since 4.7.0 * - * @param mixed $value The value to filter. - * @param array $args Additional parameters to pass to the callback functions. - * This array is expected to include $value at index 0. + * @param mixed $value The value to filter. + * @param list $args Additional parameters to pass to the callback functions. + * This array is expected to include $value at index 0. * @return mixed The filtered value after all hooked functions are applied to it. */ public function apply_filters( $value, $args ) { @@ -337,9 +340,14 @@ public function apply_filters( $value, $args ) { $num_args = count( $args ); do { - $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] ); + $priority = current( $this->iterations[ $nesting_level ] ); + + if ( false === $priority ) { + // This is not expected to occur since the hook is known to have callbacks at one or more priorities. + break; + } - $priority = $this->current_priority[ $nesting_level ]; + $this->current_priority[ $nesting_level ] = $priority; foreach ( $this->callbacks[ $priority ] as $the_ ) { if ( ! $this->doing_action ) { @@ -370,7 +378,8 @@ public function apply_filters( $value, $args ) { * * @since 4.7.0 * - * @param array $args Parameters to pass to the callback functions. + * @param list $args Parameters to pass to the callback functions. + * @return void */ public function do_action( $args ) { $this->doing_action = true; @@ -387,7 +396,8 @@ public function do_action( $args ) { * * @since 4.7.0 * - * @param array $args Arguments to pass to the hook callbacks. Passed by reference. + * @param list $args Arguments to pass to the hook callbacks. Passed by reference. + * @return void */ public function do_all_hook( &$args ) { $nesting_level = $this->nesting_level++; From bf773c385fb93c3d10fc87919fb6cb0cbddb3616 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 7 Jul 2026 19:05:10 -0700 Subject: [PATCH 5/9] Widen $callback type for remove_filter() and has_filter() --- src/wp-includes/class-wp-hook.php | 22 ++++++++++++---------- src/wp-includes/plugin.php | 11 ++++++----- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index 28da8d72d4304..ee2154cc8f3ae 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -197,12 +197,13 @@ private function resort_active_iterations( $new_priority = false, $priority_exis * * @since 4.7.0 * - * @param string $hook_name The filter hook to which the function to be removed is hooked. - * @param callable $callback The callback to be removed from running when the filter is applied. - * This method can be called unconditionally to speculatively remove - * a callback that may or may not exist. - * @param int $priority The exact priority used when adding the original filter callback. + * @param string $hook_name The filter hook to which the function to be removed is hooked. + * @param callable|string|array $callback The callback to be removed from running when the filter is applied. + * This method can be called unconditionally to speculatively remove + * a callback that may or may not exist. + * @param int $priority The exact priority used when adding the original filter callback. * @return bool Whether the callback existed before it was removed. + * @phpstan-param callable|string|array{ 0: string|object, 1: string, ... } $callback */ public function remove_filter( $hook_name, $callback, $priority ) { if ( null === $priority ) { @@ -239,17 +240,18 @@ public function remove_filter( $hook_name, $callback, $priority ) { * @since 4.7.0 * @since 6.9.0 Added the `$priority` parameter. * - * @param string $hook_name Optional. The name of the filter hook. Default empty. - * @param callable|false $callback Optional. The callback to check for. - * This method can be called unconditionally to speculatively check - * a callback that may or may not exist. Default false. - * @param int|false $priority Optional. The specific priority at which to check for the callback. + * @param string $hook_name Optional. The name of the filter hook. Default empty. + * @param callable|string|array|false $callback Optional. The callback to check for. + * This method can be called unconditionally to speculatively check + * a callback that may or may not exist. Default false. + * @param int|false $priority Optional. The specific priority at which to check for the callback. * Default false. * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has * anything registered. When checking a specific function, the priority * of that hook is returned, or false if the function is not attached. * If `$callback` and `$priority` are both provided, a boolean is returned * for whether the specific function is registered at that priority. + * @phpstan-param callable|string|array{ 0: string|object, 1: string, ... }|false $callback */ public function has_filter( $hook_name = '', $callback = false, $priority = false ) { if ( false === $callback ) { diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php index 55459c0dd96c8..374de3cb3ce05 100644 --- a/src/wp-includes/plugin.php +++ b/src/wp-includes/plugin.php @@ -992,12 +992,13 @@ function _wp_call_all_hook( $args ) { * * @access private * - * @param string $hook_name Unused. The name of the filter to build ID for. - * @param callable $callback The callback to generate ID for. The callback may - * or may not exist. - * @param int $priority Unused. The order in which the functions - * associated with a particular action are executed. + * @param string $hook_name Unused. The name of the filter to build ID for. + * @param callable|string|array $callback The callback to generate ID for. The callback may + * or may not exist. + * @param int $priority Unused. The order in which the functions + * associated with a particular action are executed. * @return string|null Unique function ID for usage as array key, or null if it couldn't be determined. + * @phpstan-param callable|string|array{ 0: string|object, 1: string, ... } $callback */ function _wp_filter_build_unique_id( $hook_name, $callback, $priority ): ?string { if ( is_string( $callback ) ) { From 3b5fd8ab1c73c26c4a13b82b480408870c211b89 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 7 Jul 2026 19:09:37 -0700 Subject: [PATCH 6/9] Pass in default priority of 10 for unused $priority arg when false --- src/wp-includes/class-wp-hook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index ee2154cc8f3ae..ea8d024db845e 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -258,7 +258,7 @@ public function has_filter( $hook_name = '', $callback = false, $priority = fals return $this->has_filters(); } - $function_key = _wp_filter_build_unique_id( $hook_name, $callback, 0 ); + $function_key = _wp_filter_build_unique_id( $hook_name, $callback, is_int( $priority ) ? $priority : 10 ); if ( ! $function_key ) { return false; From 199b9ce678729bd51fd5171c29476e63cd6a486d Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 15 Jul 2026 18:06:33 -0700 Subject: [PATCH 7/9] Remove return void for now --- src/wp-includes/class-wp-hook.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php index ea8d024db845e..d619c9d0c677d 100644 --- a/src/wp-includes/class-wp-hook.php +++ b/src/wp-includes/class-wp-hook.php @@ -87,7 +87,6 @@ final class WP_Hook implements Iterator, ArrayAccess { * and functions with the same priority are executed in the order * in which they were added to the filter. * @param int $accepted_args The number of arguments the function accepts. - * @return void */ public function add_filter( $hook_name, $callback, $priority, $accepted_args ) { if ( null === $priority ) { @@ -127,7 +126,6 @@ public function add_filter( $hook_name, $callback, $priority, $accepted_args ) { * for no priority being added. * @param bool $priority_existed Optional. Flag for whether the priority already existed before the new * filter was added. Default false. - * @return void */ private function resort_active_iterations( $new_priority = false, $priority_existed = false ) { $new_priorities = $this->priorities; @@ -300,7 +298,6 @@ public function has_filters() { * @since 4.7.0 * * @param int|false $priority Optional. The priority number to remove. Default false. - * @return void */ public function remove_all_filters( $priority = false ) { if ( ! $this->callbacks ) { @@ -381,7 +378,6 @@ public function apply_filters( $value, $args ) { * @since 4.7.0 * * @param list $args Parameters to pass to the callback functions. - * @return void */ public function do_action( $args ) { $this->doing_action = true; @@ -399,7 +395,6 @@ public function do_action( $args ) { * @since 4.7.0 * * @param list $args Arguments to pass to the hook callbacks. Passed by reference. - * @return void */ public function do_all_hook( &$args ) { $nesting_level = $this->nesting_level++; From bd5a548eac5017d8665d40e1037798d0416f982d Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 15 Jul 2026 19:12:18 -0700 Subject: [PATCH 8/9] Disallow named arguments on apply_filters() and do_action() --- src/wp-includes/plugin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php index 374de3cb3ce05..1a688d9c1c71d 100644 --- a/src/wp-includes/plugin.php +++ b/src/wp-includes/plugin.php @@ -169,6 +169,7 @@ function add_filter( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) * @param string $hook_name The name of the filter hook. * @param mixed $value The value to filter. * @param mixed ...$args Optional. Additional parameters to pass to the callback functions. + * @no-named-arguments * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters( $hook_name, $value, ...$args ) { @@ -484,6 +485,7 @@ function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) * @param string $hook_name The name of the action to be executed. * @param mixed ...$arg Optional. Additional arguments which are passed on to the * functions hooked to the action. Default empty. + * @no-named-arguments */ function do_action( $hook_name, ...$arg ) { global $wp_filter, $wp_actions, $wp_current_filter; From 824c89b36386b019cb7fad7993864682e53ea92e Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 15 Jul 2026 19:28:59 -0700 Subject: [PATCH 9/9] Use list consistently on plugin functions --- src/wp-includes/plugin.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php index 1a688d9c1c71d..f76fec3ad9e0c 100644 --- a/src/wp-includes/plugin.php +++ b/src/wp-includes/plugin.php @@ -223,8 +223,8 @@ function apply_filters( $hook_name, $value, ...$args ) { * @global int[] $wp_filters Stores the number of times each filter was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * - * @param string $hook_name The name of the filter hook. - * @param array $args The arguments supplied to the functions hooked to `$hook_name`. + * @param string $hook_name The name of the filter hook. + * @param list $args The arguments supplied to the functions hooked to `$hook_name`. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters_ref_array( $hook_name, $args ) { @@ -539,8 +539,8 @@ function do_action( $hook_name, ...$arg ) { * @global int[] $wp_actions Stores the number of times each action was triggered. * @global string[] $wp_current_filter Stores the list of current filters with the current one last. * - * @param string $hook_name The name of the action to be executed. - * @param array $args The arguments supplied to the functions hooked to `$hook_name`. + * @param string $hook_name The name of the action to be executed. + * @param list $args The arguments supplied to the functions hooked to `$hook_name`. */ function do_action_ref_array( $hook_name, $args ) { global $wp_filter, $wp_actions, $wp_current_filter; @@ -715,11 +715,11 @@ function did_action( $hook_name ) { * * @see _deprecated_hook() * - * @param string $hook_name The name of the filter hook. - * @param array $args Array of additional function arguments to be passed to apply_filters(). - * @param string $version The version of WordPress that deprecated the hook. - * @param string $replacement Optional. The hook that should have been used. Default empty. - * @param string $message Optional. A message regarding the change. Default empty. + * @param string $hook_name The name of the filter hook. + * @param list $args Array of additional function arguments to be passed to apply_filters(). + * @param string $version The version of WordPress that deprecated the hook. + * @param string $replacement Optional. The hook that should have been used. Default empty. + * @param string $message Optional. A message regarding the change. Default empty. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) { @@ -743,11 +743,11 @@ function apply_filters_deprecated( $hook_name, $args, $version, $replacement = ' * * @see _deprecated_hook() * - * @param string $hook_name The name of the action hook. - * @param array $args Array of additional function arguments to be passed to do_action(). - * @param string $version The version of WordPress that deprecated the hook. - * @param string $replacement Optional. The hook that should have been used. Default empty. - * @param string $message Optional. A message regarding the change. Default empty. + * @param string $hook_name The name of the action hook. + * @param list $args Array of additional function arguments to be passed to do_action(). + * @param string $version The version of WordPress that deprecated the hook. + * @param string $replacement Optional. The hook that should have been used. Default empty. + * @param string $message Optional. A message regarding the change. Default empty. */ function do_action_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) { if ( ! has_action( $hook_name ) ) { @@ -969,7 +969,7 @@ function register_uninstall_hook( $file, $callback ) { * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * - * @param array $args The collected parameters from the hook that was called. + * @param list $args The collected parameters from the hook that was called. */ function _wp_call_all_hook( $args ) { global $wp_filter;