From e14b61ca8ae849e1f3b03e9ab600453b0b06d653 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 18 Jul 2019 03:02:16 +0200
Subject: [PATCH] Simplify & modernize wp_iframe()
---
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 d6a2116bb8..aa226474c4 100644
|
a
|
b
|
function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data |
| 491 | 491 | * @param callable $content_func Function that outputs the content. |
| 492 | 492 | * @param mixed ...$args Optional additional parameters to pass to the callback function when it's called. |
| 493 | 493 | */ |
| 494 | | function wp_iframe( $content_func ) { |
| | 494 | function wp_iframe( $content_func, ...$args ) { |
| 495 | 495 | _wp_admin_html_begin(); |
| 496 | 496 | ?> |
| 497 | 497 | <title><?php bloginfo( 'name' ); ?> › <?php _e( 'Uploads' ); ?> — <?php _e( 'WordPress' ); ?></title> |
| … |
… |
isRtl = <?php echo (int) is_rtl(); ?>; |
| 571 | 571 | document.body.className = document.body.className.replace('no-js', 'js'); |
| 572 | 572 | </script> |
| 573 | 573 | <?php |
| 574 | | $args = func_get_args(); |
| 575 | | $args = array_slice( $args, 1 ); |
| 576 | 574 | call_user_func_array( $content_func, $args ); |
| 577 | 575 | |
| 578 | 576 | /** This action is documented in wp-admin/admin-footer.php */ |