post_link

過濾鉤子
apply_filters( 'post_link', $permalink, $post, $leavename )
引數
  • (string) $permalink The post's permalink.
    Required:
  • (WP_Post) $post The post in question.
    Required:
  • (bool) $leavename Whether to keep the post name.
    Required:
定義位置
相關勾子
pre_post_linkedit_post_linkpost_type_linkmonth_linktag_link
相關方法
post_permalinknext_post_linkposts_nav_linkedit_post_linknext_posts_linkpost_reply_link
引入
1.5.0
棄用
-

post_thumbnail_html。這個鉤子允許你修改用於在WordPress儀表盤的文章編輯螢幕上顯示文章縮圖(特色圖片)的HTML。

過濾一個文章的固定連結。

只適用於post_type為”post”的文章。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'post_link', $permalink, $post, $leavename );
return apply_filters( 'post_link', $permalink, $post, $leavename );
return apply_filters( 'post_link', $permalink, $post, $leavename );

常見問題

FAQs
檢視更多 >