Changeset 20179 for trunk/wp-includes/media.php
- Timestamp:
- 03/15/2012 04:14:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r19871 r20179 1442 1442 return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&hl=en&fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr ); 1443 1443 } 1444 1445 /** 1446 * Prints default plupload arguments. 1447 * 1448 * @since 3.4.0 1449 */ 1450 function wp_plupload_default_settings() { 1451 global $wp_scripts; 1452 1453 $max_upload_size = wp_max_upload_size(); 1454 1455 $params = array( 1456 'action' => 'upload-attachment', 1457 ); 1458 $params = apply_filters( 'plupload_default_params', $params ); 1459 1460 $params['_wpnonce'] = wp_create_nonce( 'media-form' ); 1461 1462 $settings = array( 1463 'runtimes' => 'html5,silverlight,flash,html4', 1464 'file_data_name' => 'async-upload', // key passed to $_FILE. 1465 'multiple_queues' => true, 1466 'max_file_size' => $max_upload_size . 'b', 1467 'url' => admin_url( 'admin-ajax.php' ), 1468 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), 1469 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), 1470 'filters' => array( array( 'title' => __( 'Allowed Files' ), 'extensions' => '*') ), 1471 'multipart' => true, 1472 'urlstream_upload' => true, 1473 'multipart_params' => $params, 1474 ); 1475 1476 $settings = apply_filters( 'plupload_default_settings', $settings ); 1477 1478 $script = 'var wpPluploadDefaults = ' . json_encode( $settings ) . ';'; 1479 1480 $data = $wp_scripts->get_data( 'wp-plupload', 'data' ); 1481 if ( $data ) 1482 $script = "$data\n$script"; 1483 1484 $wp_scripts->add_data( 'wp-plupload', 'data', $script ); 1485 } 1486 add_action( 'admin_init', 'wp_plupload_default_settings' );
Note: See TracChangeset
for help on using the changeset viewer.