WordPress.org

Make WordPress Core

Ticket #21407: 21407-alternative.diff

File 21407-alternative.diff, 849 bytes (added by DrewAPicture, 6 years ago)

alternative to extract()

  • wp-admin/includes/media.php

     
    13691369$large_size_w = absint( get_option('large_size_w') );
    13701370if( !$large_size_w )
    13711371        $large_size_w = 1024;
     1372
     1373$dimensions = $args = '';
     1374
     1375        $dimensions = array(
     1376                'height' => $large_size_h,
     1377                'width' => $large_size_w
     1378        );
     1379       
     1380        $args = apply_filters( 'upload_resize_dimensions', $args );
     1381       
     1382        $dimensions = wp_parse_args( $args, $dimensions );
    13721383?>
    1373 var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
     1384
     1385var resize_height = <?php echo $dimensions['height']; ?>, resize_width = <?php echo $dimensions['width']; ?>,
    13741386wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
    13751387</script>
    13761388