From fabca552aaefa50bf4f7c9b286708d071a209399 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 23 Aug 2017 15:52:46 +0000 Subject: [PATCH] Docs: Clarify the expected usage of the `$args` parameter as an array in the DocBlock for `apply_filters_deprecated()`, including an example. See #41017. Built from https://develop.svn.wordpress.org/trunk@41308 git-svn-id: http://core.svn.wordpress.org/trunk@41139 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/plugin.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index baa0a585ff..5a87e40635 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -575,6 +575,15 @@ function remove_all_actions($tag, $priority = false) { * apply_filters_deprecated(), which triggers a deprecation notice and then fires * the original filter hook. * + * Note: the value and extra arguments passed to the original apply_filters() call + * must be passed here to `$args` as an array. For example: + * + * // Old filter. + * return apply_filters( 'wpdocs_filter', $value, $extra_arg ); + * + * // Deprecated. + * return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9', 'wpdocs_new_filter' ); + * * @since 4.6.0 * * @see _deprecated_hook() diff --git a/wp-includes/version.php b/wp-includes/version.php index 700d2688d6..dcd13b4f90 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41294'; +$wp_version = '4.9-alpha-41308'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.