Changes in trunk/wp-includes/media.php [16865:17751]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r16865 r17751 126 126 * 127 127 * @param int $id Attachment ID for image. 128 * @param string $size Optional, default is 'medium'. Size of image, can be 'thumbnail'.128 * @param array|string $size Optional, default is 'medium'. Size of image, either array or string. 129 129 * @return bool|array False on failure, array on success. 130 130 */ … … 251 251 252 252 // Set artificially high because GD uses uncompressed images in memory 253 @ini_set( 'memory_limit', '256M');253 @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) ); 254 254 $image = imagecreatefromstring( file_get_contents( $file ) ); 255 255 … … 1026 1026 1027 1027 /** 1028 * PHP4 constructor 1029 */ 1030 function WP_Embed() { 1031 return $this->__construct(); 1032 } 1033 1034 /** 1035 * PHP5 constructor 1028 * Constructor 1036 1029 */ 1037 1030 function __construct() { … … 1407 1400 $oembed->providers[$format] = array( $provider, $regex ); 1408 1401 } 1402 1403 /** 1404 * Determines if default embed handlers should be loaded. 1405 * 1406 * Checks to make sure that the embeds library hasn't already been loaded. If 1407 * it hasn't, then it will load the embeds library. 1408 * 1409 * @since 2.9.0 1410 */ 1411 function wp_maybe_load_embeds() { 1412 if ( ! apply_filters( 'load_default_embeds', true ) ) 1413 return; 1414 wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' ); 1415 } 1416 1417 /** 1418 * The Google Video embed handler callback. Google Video does not support oEmbed. 1419 * 1420 * @see WP_Embed::register_handler() 1421 * @see WP_Embed::shortcode() 1422 * 1423 * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}. 1424 * @param array $attr Embed attributes. 1425 * @param string $url The original URL that was matched by the regex. 1426 * @param array $rawattr The original unmodified attributes. 1427 * @return string The embed HTML. 1428 */ 1429 function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) { 1430 // If the user supplied a fixed width AND height, use it 1431 if ( !empty($rawattr['width']) && !empty($rawattr['height']) ) { 1432 $width = (int) $rawattr['width']; 1433 $height = (int) $rawattr['height']; 1434 } else { 1435 list( $width, $height ) = wp_expand_dimensions( 425, 344, $attr['width'], $attr['height'] ); 1436 } 1437 1438 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 ); 1439 } 1440 1441 ?>
Note: See TracChangeset
for help on using the changeset viewer.