adjacent_image_link

函式
adjacent_image_link ( $prev = true, $size = 'thumbnail', $text = false )
引數
  • (bool) $prev Optional. Whether to display the next (false) or previous (true) link. Default true.
    Required:
    Default: true
  • (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'
  • (bool) $text Optional. Link text. Default false.
    Required:
    Default: false
定義位置
相關方法
get_adjacent_image_linknext_image_linkadjacent_post_linkget_next_image_linkadjacent_posts_rel_link
引入
2.5.0
棄用
-

adjacent_image_link: 這是一個WordPress的函式,在一個文章或頁面中生成一個指向下一個或上一個附件圖片的連結。它需要兩個引數。$prev,它是一個布林值,決定是連結到上一張圖片還是下一張,以及$size,它是要使用的圖片大小。

顯示具有相同文章父本的下一個或上一個圖片連結。

從$post全域性檢索當前的附件物件。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
echo get_adjacent_image_link( $prev, $size, $text );
}
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) { echo get_adjacent_image_link( $prev, $size, $text ); }
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
	echo get_adjacent_image_link( $prev, $size, $text );
}

常見問題

FAQs
檢視更多 >