Docs: Ensure hook and duplicate hook docs directly precede all instances of the image_memory_limit filter.
Hook docs must directly precede hooks in order for the Code Reference parser to correctly identify them as such. Fixes #36968. Built from https://develop.svn.wordpress.org/trunk@37592 git-svn-id: http://core.svn.wordpress.org/trunk@37560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -3175,8 +3175,12 @@ function wp_load_image( $file ) {
|
||||
if ( ! function_exists('imagecreatefromstring') )
|
||||
return __('The GD image library is not installed.');
|
||||
|
||||
// Set artificially high because GD uses uncompressed images in memory
|
||||
@ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
|
||||
/** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
|
||||
$image_memory_limit = apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT );
|
||||
|
||||
// Set artificially high because GD uses uncompressed images in memory.
|
||||
@ini_set( 'memory_limit', $image_memory_limit );
|
||||
|
||||
$image = imagecreatefromstring( file_get_contents( $file ) );
|
||||
|
||||
if ( !is_resource( $image ) )
|
||||
|
||||
Reference in New Issue
Block a user