From 49de2b73125b5eea6b24804ff9bef7063871568d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 15 Sep 2019 11:11:14 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@46131 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/media.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 956c31b25e..2efe0830b5 100644 --- a/src/wp-admin/includes/media.php +++ b/src/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 ) {