Action hook 'manage_media_custom_column'

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

View Source

manage_media_custom_column

Action Hook
Description
Fires for each custom column in the Media list table. Custom columns are registered using the {@see 'manage_media_columns'} filter.

Hook Information

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

Hook Parameters

Type Name Description
string $column_name Name of the custom column.
int $post_id Attachment ID.

Usage Examples

Basic Usage
<?php
// Hook into manage_media_custom_column
add_action('manage_media_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-media-list-table.php:714 - How this hook is used in WordPress core
<?php
 709  		 * @since 2.5.0
 710  		 *
 711  		 * @param string $column_name Name of the custom column.
 712  		 * @param int    $post_id     Attachment ID.
 713  		 */
 714  		do_action( 'manage_media_custom_column', $column_name, $post->ID );
 715  	}
 716  
 717  	/**
 718  	 * Generates the list table rows.
 719  	 *

PHP Documentation

<?php
/**
		 * Fires for each custom column in the Media list table.
		 *
		 * Custom columns are registered using the {@see 'manage_media_columns'} filter.
		 *
		 * @since 2.5.0
		 *
		 * @param string $column_name Name of the custom column.
		 * @param int    $post_id     Attachment ID.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-admin/includes/class-wp-media-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.