get_archives_link

過濾鉤子
apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected )
引數
  • (string) $link_html The archive HTML link content.
    Required:
  • (string) $url URL to archive.
    Required:
  • (string) $text Archive text description.
    Required:
  • (string) $format Link format. Can be 'link', 'option', 'html', or custom.
    Required:
  • (string) $before Content to prepend to the description.
    Required:
  • (string) $after Content to append to the description.
    Required:
  • (bool) $selected True if the current page is the selected archive.
    Required:
定義位置
相關勾子
getarchives_joinget_page_linkpost_type_archive_linksearch_linkget_comments_link
相關方法
get_archives_linkget_archivesget_search_linkget_search_feed_linkwp_get_archivesget_post_type_archive_link
引入
5.2.0
棄用
-

get_archives_link: 這個函式根據傳遞給函式的引數,生成一個指向檔案頁(月、日、年等)的連結: 該函式接受一個可選的引數陣列,包括型別(日、月、年)、格式(連結文字),以及用於指定連結前後顯示的HTML的前後引數。

過濾檔案連結的內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );

常見問題

FAQs
檢視更多 >