manage_posts_columns

過濾鉤子
apply_filters( 'manage_posts_columns', $posts_columns, $post_type )
引數
  • (string[]) $post_columns An associative array of column headings.
    Required:
  • (string) $post_type The post type slug.
    Required:
定義位置
相關勾子
manage_pages_columnsmanage_posts_custom_columnmanage_post_type_posts_columnsmanage_media_columnsmanage_pages_custom_column
相關方法
update_posts_countget_post_classmaybe_drop_columnget_post_customnext_posts_linkget_post_custom_values
引入
1.5.0
棄用
-

manage_posts_columns 是WordPress的一個過濾鉤子,用於在WordPress管理中的”Post”螢幕的列表檢視中新增自定義列。這個鉤子允許開發者在”文章”螢幕上新增對網站管理員有用的額外資訊。例如,一個文章的最後更新日期,最後更新該文章的作者,或其他相關資訊。

過濾文章列表表中顯示的列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );

常見問題

FAQs
檢視更多 >