Make WordPress Core

Changeset 22488


Ignore:
Timestamp:
11/09/2012 04:51:25 AM (12 years ago)
Author:
nacin
Message:

Allow wp_plupload_default_settings() to be called multiple times without doubling up the output. see #22060.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22466 r22488  
    11771177    global $wp_scripts;
    11781178
     1179    $data = $wp_scripts->get_data( 'wp-plupload', 'data' );
     1180    if ( $data && false !== strpos( $data, '_wpPluploadSettings' ) )
     1181        return;
     1182
    11791183    $max_upload_size = wp_max_upload_size();
    11801184
     
    12121216    $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';';
    12131217
    1214     $data = $wp_scripts->get_data( 'wp-plupload', 'data' );
    12151218    if ( $data )
    12161219        $script = "$data\n$script";
Note: See TracChangeset for help on using the changeset viewer.