get_sample_permalink

過濾鉤子
apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post )
引數
  • (array) $permalink { Array containing the sample permalink with placeholder for the post name, and the post name. @type string $0 The permalink with placeholder for the post name. @type string $1 The post name. }
    Required:
  • (int) $post_id Post ID.
    Required:
  • (string) $title Post title.
    Required:
  • (string) $name Post name (slug).
    Required:
  • (WP_Post) $post Post object.
    Required:
定義位置
相關勾子
get_sample_permalink_htmlthe_permalinkget_edit_term_linkget_page_linkthe_permalink_rss
相關方法
get_sample_permalinkget_sample_permalink_htmlget_the_permalinkget_post_permalinkget_blog_permalinkget_permalink
引入
4.4.0
棄用
-

get_sample_permalink 是一個WordPress的函式,用於在一個文章或頁面被儲存之前,檢索一個樣板: 該函式接受一個文章ID和一個標題作為引數,並返回一個樣本固定連結。

過濾樣本的固定內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );
return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );

常見問題

FAQs
檢視更多 >