Posted By

wpCanyon on 11/17/10


Tagged

wordpress


Versions (?)

Adding ID Field To The Media Library Listing In WordPress Admin


 / Published in: PHP
 

URL: http://wpcanyon.com/tipsandtricks/adding-id-field-to-the-media-library-listing-in-wordpress-admin/

  1. function mediaColumnsHeader($columns) {
  2. $columns['medID'] = __('ID');
  3. return $columns;
  4. }
  5.  
  6. add_filter( 'manage_media_columns', 'mediaColumnsHeader' );
  7.  
  8. function mediaColumnsRow($columnName, $columnID){
  9. if($columnName == 'medID'){
  10. echo $columnID;
  11. }
  12. }
  13.  
  14. add_filter( 'manage_media_custom_column', 'mediaColumnsRow', 10, 2 );

Report this snippet  

You need to login to post a comment.