Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 9th, 2011  |  syntax: None  |  size: 1.74 KB  |  views: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /* Manage pages screen */
  2. function remove_pages_count_columns($defaults) {
  3.   unset($defaults['comments']);
  4.   unset($defaults['date']);
  5.   unset($defaults['cb']);
  6.   unset($defaults['author']);
  7.   return $defaults;
  8. }
  9. add_filter('manage_pages_columns', 'remove_pages_count_columns');
  10.  
  11.  
  12. // Remove stuff below each entry
  13. function remove_quick_edit( $actions ) {
  14.         unset( $actions['inline hide-if-no-js'] );
  15.         unset( $actions['trash'] );
  16.         unset( $actions['view'] );
  17.         unset( $actions['edit'] );
  18. return $actions;
  19. }
  20. add_filter('page_row_actions','remove_quick_edit',10,1);
  21.  
  22.  
  23.  
  24. // Add own columns
  25. function page_column_views($columns) {
  26.         $columns['move'] = 'Move';
  27. //      $columns['edit'] = 'Edit';
  28.         $columns['delete'] = 'Delete';
  29.         $columns['published'] = 'Published';
  30.         return $columns;
  31. }
  32. add_filter( 'manage_pages_columns', 'page_column_views' );
  33.  
  34.  
  35. // ...And populate them!
  36. function page_custom_column_views($name) {
  37.     global $post;
  38.     if ("move" == $name) _e("Move");
  39. //  elseif ("edit" == $name) _e("Edit");
  40.     elseif ("delete" == $name) _e("Delete");
  41.     elseif ("published" == $name) _e("Published");
  42. }
  43. add_action( 'manage_pages_custom_column', 'page_custom_column_views', 5, 2 );
  44.  
  45.  
  46. // On hovering page title, reveal options
  47. function custom_admin_mange_pages() {?>
  48.         <script type="text/javascript">
  49.         //<![CDATA[
  50.                 jQuery("#the-list tr").hover(
  51.                         function () {
  52.                         jQuery(this).find("td.column-move, td.column-delete, td.column-edit").css("visibility", "visible");
  53.                         },
  54.                         function () {
  55.                                 jQuery(this).find("td.column-move, td.column-delete, td.column-edit").css("visibility", "hidden");
  56.                         }
  57.                 );
  58.         //]]>
  59.         </script><?php
  60. }
  61. add_action('admin_print_footer_scripts', 'custom_admin_mange_pages');
  62.  
clone this paste RAW Paste Data