manage_category_custom_column
Filters the displayed columns in the terms list table.
Это один из вариантов динамического хука manage_(screen_taxonomy)_custom_column
Использование
add_filter( 'manage_category_custom_column', 'wp_kama_manage_category_custom_column_filter', 10, 3 ); /** * Function for `manage_category_custom_column` filter-hook. * * @param string $string Custom column output. * @param string $column_name Name of the column. * @param int $term_id Term ID. * * @return string */ function wp_kama_manage_category_custom_column_filter( $string, $column_name, $term_id ){ // filter... return $string; }
- $string(строка)
- Custom column output.
По умолчанию: '' - $column_name(строка)
- Name of the column.
- $term_id(int)
- Term ID.
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
wp-admin/includes/class-wp-terms-list-table.php 669
return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id );