Advertisement
mikelittle

remove attached column from media library

Feb 23rd, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: Zed1 test
  4. Plugin URI: http://zed1.com/
  5. Description: Test some stuf
  6. Author: Mike Little
  7. Version: 0.0.1
  8. Author URI: http://zed1.com/
  9. Author URI: http://zed1.com/
  10. License: GPL2+
  11. */
  12. /*
  13.     Copyright 2011  Mike Little  (email : mike@zed1.com)
  14.  
  15.     This file is part of The Zed1 test  Plugin.
  16.  
  17.     The Zed1 test  Plugin is free software:
  18.     you can redistribute it and/or modify it under the terms of the
  19.     GNU General Public License as published by the Free Software Foundation,
  20.     either version 2 of the License, or (at your option) any later version.
  21.  
  22.     This program is distributed in the hope that it will be useful,
  23.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  24.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  25.     GNU General Public License for more details.
  26.  
  27.     You should have received a copy of the GNU General Public License
  28.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  29. */
  30.  
  31. new zed1_test();
  32.  
  33. class zed1_test {
  34.     static $my_data;
  35.  
  36.     function zed1_test() {
  37.         return $this->__construct();
  38.     } // end php4 constructor
  39.  
  40.     function __construct() {
  41.         add_action( 'init', array( 'zed1_test', 'init' ) );
  42.     } // end constructor
  43.  
  44.     static function init() {
  45.         add_filter( 'manage_media_columns', array( 'zed1_test', 'manage_media_columns' ), 10, 2 );
  46.     } // end init
  47.  
  48.     static function manage_media_columns( $posts_columns, $detached ) {
  49.         unset($posts_columns['parent']);
  50.         return $posts_columns;
  51.     }
  52.  
  53. } // end class zed1_test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement