Action hook 'manage_posts_custom_column'

in WP Core File wp-admin/includes/class-wp-posts-list-table.php at line 1392

View Source

manage_posts_custom_column

Action Hook
Description
Fires in each custom column in the Posts list table. This hook only fires if the current post type is non-hierarchical, such as posts.

Hook Information

File Location wp-admin/includes/class-wp-posts-list-table.php View on GitHub
Hook Type Action
Line Number 1392

Hook Parameters

Type Name Description
string $column_name The name of the column to display.
int $post_id The current post ID.

Usage Examples

Basic Usage
<?php
// Hook into manage_posts_custom_column
add_action('manage_posts_custom_column', 'my_custom_function', 10, 2);

function my_custom_function($column_name, $post_id) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/class-wp-posts-list-table.php:1392 - How this hook is used in WordPress core
<?php
1387  			 * @since 1.5.0
1388  			 *
1389  			 * @param string $column_name The name of the column to display.
1390  			 * @param int    $post_id     The current post ID.
1391  			 */
1392  			do_action( 'manage_posts_custom_column', $column_name, $post->ID );
1393  		}
1394  
1395  		/**
1396  		 * Fires for each custom column of a specific post type in the Posts list table.
1397  		 *

PHP Documentation

<?php
/**
			 * Fires in each custom column in the Posts list table.
			 *
			 * This hook only fires if the current post type is non-hierarchical,
			 * such as posts.
			 *
			 * @since 1.5.0
			 *
			 * @param string $column_name The name of the column to display.
			 * @param int    $post_id     The current post ID.
			 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.