WordPress开发者和主题制作者的搜索引擎



remove_image_size ›

Since3.9.0
已弃用n/a
remove_image_size ( $name )
参数:
  • (string) $name The image size to remove.
    Required: Yes
返回:
  • (bool) True if the image size was successfully removed, false on failure.
定义在:
文档:

Remove 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;
}