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:
parent
f864c2f871
commit
7c421791c2
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue