Advertisement
Guest User

Columns

a guest
Jul 2nd, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. // Custom columns
  2.     function custom_columns($args) {
  3.         $args = array('cb' => '<input type="checkbox" />', 'title' => __('Title'), 'thumbnail' => __('Thumbnail'), 'author' => __('Author'), 'categories' => __('Categories'), 'tags' => __('Tags'), 'date' => __('Date'));
  4.         return $args;
  5.     }
  6.     add_filter('manage_edit-slides_columns', 'custom_columns');
  7.    
  8.     // Image column
  9.     function image_column($args, $post_id) {
  10.         switch($args) {
  11.             case 'thumbnail':
  12.                 echo the_post_thumbnail('admin-thumbnail');
  13.             break;
  14.         }
  15.     }
  16.     add_action('manage_slides_posts_custom_column', 'image_column', 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement