remove_image_size

函数


remove_image_size ( $name )
参数
  • (string)
    $name
    The image size to remove.
    Required:
返回值
  • (bool) True if the image size was successfully removed, false on failure.
定义位置
  • wp-includes/media.php
    , line 324
引入
3.9.0
弃用

Removes a new image size.

function remove_image_size( $name ) {
	global $_wp_additional_image_sizes;

	if ( isset( $_wp_additional_image_sizes[ $name ] ) ) {
		unset( $_wp_additional_image_sizes[ $name ] );
		return true;
	}

	return false;
}