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

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32546


git-svn-id: http://core.svn.wordpress.org/trunk@32516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-05-22 06:18:25 +00:00
parent af7a017f46
commit bf43be3e9e
5 changed files with 33 additions and 12 deletions

View File

@ -46,6 +46,9 @@ class WP_HTTP_IXR_Client extends IXR_Client {
$this->timeout = $timeout;
}
/**
* @return bool
*/
public function query() {
$args = func_get_args();
$method = array_shift($args);

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 );

View File

@ -37,6 +37,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @since 3.5.0
* @access public
*
* @param array $args
* @return boolean
*/
public static function test( $args = array() ) {
@ -112,7 +113,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @since 3.5.0
* @access protected
*
* @return boolean|WP_Error True if loaded; WP_Error on failure.
* @return true|WP_Error True if loaded; WP_Error on failure.
*/
public function load() {
if ( $this->image instanceof Imagick )
@ -156,7 +157,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @access public
*
* @param int $quality Compression Quality. Range: [1,100]
* @return boolean|WP_Error True if set successfully; WP_Error on failure.
* @return true|WP_Error True if set successfully; WP_Error on failure.
*/
public function set_quality( $quality = null ) {
$quality_result = parent::set_quality( $quality );
@ -374,7 +375,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @access public
*
* @param float $angle
* @return boolean|WP_Error
* @return true|WP_Error
*/
public function rotate( $angle ) {
/**
@ -405,7 +406,7 @@ class WP_Image_Editor_Imagick 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 ) {
try {
@ -449,6 +450,13 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
return $saved;
}
/**
*
* @param Imagick $image
* @param string $filename
* @param string $mime_type
* @return array|WP_Error
*/
protected function _save( $image, $filename = null, $mime_type = null ) {
list( $filename, $extension, $mime_type ) = $this->get_output_format( $filename, $mime_type );
@ -491,7 +499,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @access public
*
* @param string $mime_type
* @return boolean|WP_Error
* @return true|WP_Error
*/
public function stream( $mime_type = null ) {
list( $filename, $extension, $mime_type ) = $this->get_output_format( null, $mime_type );

View File

@ -226,7 +226,7 @@ abstract class WP_Image_Editor {
* @access public
*
* @param int $quality Compression Quality. Range: [1,100]
* @return boolean|WP_Error True if set successfully; WP_Error on failure.
* @return true|WP_Error True if set successfully; WP_Error on failure.
*/
public function set_quality( $quality = null ) {
if ( null === $quality ) {
@ -445,7 +445,7 @@ abstract class WP_Image_Editor {
* @access protected
*
* @param string $extension
* @return string|boolean
* @return string|false
*/
protected static function get_mime_type( $extension = null ) {
if ( ! $extension )
@ -471,7 +471,7 @@ abstract class WP_Image_Editor {
* @access protected
*
* @param string $mime_type
* @return string|boolean
* @return string|false
*/
protected static function get_extension( $mime_type = null ) {
$extensions = explode( '|', array_search( $mime_type, wp_get_mime_types() ) );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32545';
$wp_version = '4.3-alpha-32546';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.