Remove return descriptions from the DocBlocks for `add_image_size()` and `set_post_thumbnail_size()` as they don't return anything.

Also document the `$_wp_additional_image_sizes` global, leveraged in `add_image_size()`.

Props stevegrunwell.
Fixes #30511.


git-svn-id: https://develop.svn.wordpress.org/trunk@30633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes (DrewAPicture) 2014-11-30 05:48:03 +00:00
parent f864c2f871
commit 7c421791c2
1 changed files with 3 additions and 2 deletions

View File

@ -214,12 +214,13 @@ function image_downsize($id, $size = 'medium') {
*
* @since 2.9.0
*
* @global array $_wp_additional_image_sizes Associative array of additional image sizes.
*
* @param string $name Image size identifier.
* @param int $width Image width in pixels.
* @param int $height Image height in pixels.
* @param bool|array $crop Optional. Whether to crop images to specified height and width or resize.
* An array can specify positioning of the crop area. Default false.
* @return bool|array False, if no image was created. Metadata array on success.
*/
function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
global $_wp_additional_image_sizes;
@ -268,13 +269,13 @@ function remove_image_size( $name ) {
* Registers an image size for the post thumbnail.
*
* @since 2.9.0
*
* @see add_image_size() for details on cropping behavior.
*
* @param int $width Image width in pixels.
* @param int $height Image height in pixels.
* @param bool|array $crop Optional. Whether to crop images to specified height and width or resize.
* An array can specify positioning of the crop area. Default false.
* @return bool|array False, if no image was created. Metadata array on success.
*/
function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
add_image_size( 'post-thumbnail', $width, $height, $crop );