manage_page_posts_columns
Filters the columns displayed in the Posts list table for a specific post type.
Это один из вариантов динамического хука manage_(post_type)_posts_columns
Использование
add_filter( 'manage_page_posts_columns', 'wp_kama_manage_page_posts_columns_filter' ); /** * Function for `manage_page_posts_columns` filter-hook. * * @param string[] $post_columns An associative array of column headings. * * @return string[] */ function wp_kama_manage_page_posts_columns_filter( $post_columns ){ // filter... return $post_columns; }
- $post_columns(string[])
- An associative array of column headings.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
manage_page_posts_columns
wp-admin/includes/class-wp-posts-list-table.php 756
return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );