get_previous_image_link

函数


get_previous_image_link ( $size = 'thumbnail', $text = false )
参数
  • (string|int[])
    $size
    Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default ‘thumbnail’.
    Required:
    Default: ‘thumbnail’
  • (string|false)
    $text
    Optional. Link text. Default false.
    Required:
    Default: false
返回值
  • (string) Markup for previous image link.
相关
  • get_adjacent_image_link()
定义位置
  • wp-includes/media.php
    , line 3503
引入
5.8.0
弃用

获取具有相同文章父级的前一个图片链接。

function get_previous_image_link( $size = 'thumbnail', $text = false ) {
	return get_adjacent_image_link( true, $size, $text );
}