Add missing doc blocks to wp-image-editor*.php.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32546 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-05-22 06:17:16 +00:00
parent 46752a491e
commit f67ecbdadc
4 changed files with 32 additions and 11 deletions
+13 -3
View File
@@ -33,6 +33,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* @since 3.5.0
* @access public
*
* @param array $args
* @return boolean
*/
public static function test( $args = array() ) {
@@ -127,6 +128,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
*
* @param int $width
* @param int $height
* @return true
*/
protected function update_size( $width = false, $height = false ) {
if ( ! $width )
@@ -152,7 +154,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* @param int|null $max_w Image width.
* @param int|null $max_h Image height.
* @param boolean $crop
* @return boolean|WP_Error
* @return true|WP_Error
*/
public function resize( $max_w, $max_h, $crop = false ) {
if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) )
@@ -171,6 +173,13 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
return new WP_Error( 'image_resize_error', __('Image resize failed.'), $this->file );
}
/**
*
* @param int $max_w
* @param int $max_h
* @param bool|array $crop
* @return resource|WP_Error
*/
protected function _resize( $max_w, $max_h, $crop = false ) {
$dims = image_resize_dimensions( $this->size['width'], $this->size['height'], $max_w, $max_h, $crop );
if ( ! $dims ) {
@@ -303,7 +312,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* @access public
*
* @param float $angle
* @return boolean|WP_Error
* @return true|WP_Error
*/
public function rotate( $angle ) {
if ( function_exists('imagerotate') ) {
@@ -330,7 +339,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
*
* @param boolean $horz Flip along Horizontal Axis
* @param boolean $vert Flip along Vertical Axis
* @returns boolean|WP_Error
* @returns true|WP_Error
*/
public function flip( $horz, $vert ) {
$w = $this->size['width'];
@@ -433,6 +442,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* @access public
*
* @param string $mime_type
* @return bool
*/
public function stream( $mime_type = null ) {
list( $filename, $extension, $mime_type ) = $this->get_output_format( null, $mime_type );