WordPress.org

Make WordPress Core

Ticket #47678: 47678-wp_iframe.patch

File 47678-wp_iframe.patch, 1.3 KB (added by jrf, 7 months ago)

Simplify & modernize wp_iframe()

  • src/wp-admin/includes/media.php

    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 
    491491 * @param callable $content_func Function that outputs the content.
    492492 * @param mixed    ...$args      Optional additional parameters to pass to the callback function when it's called.
    493493 */
    494 function wp_iframe( $content_func ) {
     494function wp_iframe( $content_func, ...$args ) {
    495495        _wp_admin_html_begin();
    496496        ?>
    497497<title><?php bloginfo( 'name' ); ?> &rsaquo; <?php _e( 'Uploads' ); ?> &#8212; <?php _e( 'WordPress' ); ?></title>
    isRtl = <?php echo (int) is_rtl(); ?>; 
    571571document.body.className = document.body.className.replace('no-js', 'js');
    572572</script>
    573573        <?php
    574         $args = func_get_args();
    575         $args = array_slice( $args, 1 );
    576574        call_user_func_array( $content_func, $args );
    577575
    578576        /** This action is documented in wp-admin/admin-footer.php */