From 30fe3f5d4ff874ce6d3ce2ac81214c6eaf5b3be6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Sep 2019 11:12:55 +0000 Subject: [PATCH] Code Modernisation: Introduce the spread operator in `wp-admin/includes/media.php`. Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable. Props jrf. See #47678. Built from https://develop.svn.wordpress.org/trunk@46131 git-svn-id: http://core.svn.wordpress.org/trunk@45943 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 956c31b25e..2efe0830b5 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -520,7 +520,7 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data * @param callable $content_func Function that outputs the content. * @param mixed ...$args Optional additional parameters to pass to the callback function when it's called. */ -function wp_iframe( $content_func ) { +function wp_iframe( $content_func, ...$args ) { _wp_admin_html_begin(); ?> <?php bloginfo( 'name' ); ?> › <?php _e( 'Uploads' ); ?> — <?php _e( 'WordPress' ); ?> @@ -606,8 +606,6 @@ function wp_iframe( $content_func ) {