WP_Image_Editor_GD::make_image() WordPress Method

The WP_Image_Editor_GD::make_image() function is used to create a new image from a given GD resource. This function is used internally by the image editor to create images for various purposes, such as resizing or cropping.

WP_Image_Editor_GD::make_image( string $filename, callable $callback, array $arguments ) #

Either calls editor’s save function or handles file as a stream.


Parameters

$filename

(string)(Required)

$callback

(callable)(Required)

$arguments

(array)(Required)


Top ↑

Return

(bool)


Top ↑

Source

File: wp-includes/class-wp-image-editor-gd.php

	protected function make_image( $filename, $callback, $arguments ) {
		if ( wp_is_stream( $filename ) ) {
			$arguments[1] = null;
		}

		return parent::make_image( $filename, $callback, $arguments );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.