似乎除了注销该列并构建自己的列之外,没有其他方法。
自定义列的代码改编自class-wp-media-list-table.php
.
add_filter( \'manage_upload_columns\', \'columns_manage_wpse_85405\' );
add_action( \'manage_media_custom_column\', \'columns_display_wpse_85405\', 10, 2 );
function columns_manage_wpse_85405( $columns )
{
unset( $columns[\'parent\'] );
$columns[\'attached\'] = \'Parent\';
return $columns;
}
function columns_display_wpse_85405( $column_name, $post_id )
{
if( \'attached\' == $column_name )
{
$attributes = "class=\'$column_name column-$column_name\'";
$the_post = get_post( $post_id );
if ( $the_post->post_parent > 0 )
{
$title = \'\';
if ( get_post( $the_post->post_parent ) )
{
$title =_draft_or_post_title( $the_post->post_parent );
}
?>
<strong>
<?php
if( current_user_can( \'edit_post\', $the_post->post_parent ) )
{ ?>
<a href="<?php echo get_edit_post_link( $the_post->post_parent ); ?>">
<?php echo $title ?></a><?php
}
else
{
echo $title;
}
?>
</strong>, <?php echo get_the_time( __( \'Y/m/d\' ) );
?>
<?php
} else {
?>
<?php _e( \'(Unattached)\' ); ?>
<?php
}
}
}
Results in: