diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 3621f4c5ce..3e021bbdd8 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -181,12 +181,11 @@ function has_filter( $tag, $function_to_check = false ) { function apply_filters( $tag, $value ) { global $wp_filter, $wp_current_filter; - $args = array(); + $args = func_get_args(); // Do 'all' actions first. if ( isset( $wp_filter['all'] ) ) { $wp_current_filter[] = $tag; - $args = func_get_args(); _wp_call_all_hook( $args ); } @@ -201,11 +200,7 @@ function apply_filters( $tag, $value ) { $wp_current_filter[] = $tag; } - if ( empty( $args ) ) { - $args = func_get_args(); - } - - // don't pass the tag name to WP_Hook + // Don't pass the tag name to WP_Hook. array_shift( $args ); $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 17657c65ad..d0065071c8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46145'; +$wp_version = '5.3-alpha-46146'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.