Filter hook 'manage_media_columns'

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

View Source

manage_media_columns

Filter Hook
Description
Filters the Media list table columns.

Hook Information

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

Hook Parameters

Type Name Description
string[] $posts_columns An array of columns displayed in the Media list table.
bool $detached Whether the list table contains media not attached to any posts. Default true.

Usage Examples

Basic Usage
<?php
// Hook into manage_media_columns
add_filter('manage_media_columns', 'my_custom_filter', 10, 2);

function my_custom_filter($posts_columns, $detached) {
    // Your custom filtering logic here
    return $posts_columns;
}

Source Code Context

wp-admin/includes/class-wp-media-list-table.php:392 - How this hook is used in WordPress core
<?php
 387  		 *
 388  		 * @param string[] $posts_columns An array of columns displayed in the Media list table.
 389  		 * @param bool     $detached      Whether the list table contains media not attached
 390  		 *                                to any posts. Default true.
 391  		 */
 392  		return apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
 393  	}
 394  
 395  	/**
 396  	 * @return array
 397  	 */

PHP Documentation

<?php
/**
		 * Filters the Media list table columns.
		 *
		 * @since 2.5.0
		 *
		 * @param string[] $posts_columns An array of columns displayed in the Media list table.
		 * @param bool     $detached      Whether the list table contains media not attached
		 *                                to any posts. Default true.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-admin/includes/class-wp-media-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.