Adding ID Field To The Media Library Listing In WordPress Admin


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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 );

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.