manage_posts_custom_column

動作鉤子
do_action( 'manage_posts_custom_column', $column_name, $post->ID )
引數
  • (string) $column_name The name of the column to display.
    Required:
  • (int) $post_id The current post ID.
    Required:
定義位置
相關勾子
manage_sites_custom_columnmanage_users_custom_columnmanage_pages_custom_columnmanage_themes_custom_columnmanage_comments_custom_column
相關方法
get_post_custom_valuesget_post_customget_post_custom_keys_update_post_term_countpost_customupdate_posts_count
引入
1.5.0
棄用
-

manage_posts_custom_column 是WordPress的一個動作鉤子,用於在WordPress管理中的”Post”螢幕的列表檢視中顯示自定義列的內容。列表檢視中的每一行都會呼叫這個鉤子,並定義當前列的內容。這個鉤子與”manage_posts_columns”過濾鉤子一起使用,後者用於在”Post”螢幕的列表檢視中新增自定義列。

在文章列表表中的每個自定義列中觸發。

這個鉤子只在當前的文章型別是非層次性的,比如說文章,才會啟動。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'manage_posts_custom_column', $column_name, $post->ID );
do_action( 'manage_posts_custom_column', $column_name, $post->ID );
do_action( 'manage_posts_custom_column', $column_name, $post->ID );

常見問題

FAQs
檢視更多 >