manage_{$post->post_type}_posts_custom_column

動作鉤子
do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID )

manage_{$post->post_type}_posts_custom_column 是WordPress的一個動作鉤子,用來在WordPress管理中的任何自定義文章型別的列表檢視中新增自定義列: 當一個自定義列被顯示時,這個鉤子將被呼叫,並且可以定義該列的內容。這個鉤子允許開發者在任何自定義文章型別的列表檢視中新增對網站管理員有用的額外資訊。例如,自定義文章的最後更新日期,最後更新自定義文章的作者,或其他相關資訊。

為“文章”列表表中特定文章型別的每個自定義列觸發。

鉤子名稱的動態部分$post->;post_type,指的是post型別。

可能的掛鉤名稱包括:

  • manage_post_posts_custom_column
  • manage_page_posts_custom_column
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID );
do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID );
do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID );

常見問題

FAQs
檢視更多 >