manage_pages_custom_column WordPress Action Hook
The manage_pages_custom_column hook allows you to add custom columns to the "Pages" admin screen. This can be useful for displaying page-specific data that you want to be able to quickly see and manage. To use this hook, you first need to register a custom column by specifying the column header and callback function. The callback function will be responsible for outputting the data for each page. Once you have registered a custom column, it will appear on the "Pages" admin screen.
do_action( 'manage_pages_custom_column', string $column_name , int $post_id ) #
Fires in each custom column on the Posts list table.
Description
This hook only fires if the current post type is hierarchical, such as pages.
Parameters
- $column_name
(string)The name of the column to display.
- $post_id
(int)The current post ID.
More Information
Combined with the manage_pages_columns filter, this allows you to add or remove (unset) custom columns to the list page pages. Note that if you are using custom post types and it has ‘hierarchical
‘ => true
, then you will need to use this action hook and not manage_$post_type_posts_custom_column.
Source
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |