equal
deleted
inserted
replaced
82 * Helper class to be used only by back compat functions |
82 * Helper class to be used only by back compat functions |
83 * |
83 * |
84 * @since 3.1.0 |
84 * @since 3.1.0 |
85 */ |
85 */ |
86 class _WP_List_Table_Compat extends WP_List_Table { |
86 class _WP_List_Table_Compat extends WP_List_Table { |
87 var $_screen; |
87 public $_screen; |
88 var $_columns; |
88 public $_columns; |
89 |
89 |
90 function _WP_List_Table_Compat( $screen, $columns = array() ) { |
90 public function __construct( $screen, $columns = array() ) { |
91 if ( is_string( $screen ) ) |
91 if ( is_string( $screen ) ) |
92 $screen = convert_to_screen( $screen ); |
92 $screen = convert_to_screen( $screen ); |
93 |
93 |
94 $this->_screen = $screen; |
94 $this->_screen = $screen; |
95 |
95 |
97 $this->_columns = $columns; |
97 $this->_columns = $columns; |
98 add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 ); |
98 add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 ); |
99 } |
99 } |
100 } |
100 } |
101 |
101 |
102 function get_column_info() { |
102 protected function get_column_info() { |
103 $columns = get_column_headers( $this->_screen ); |
103 $columns = get_column_headers( $this->_screen ); |
104 $hidden = get_hidden_columns( $this->_screen ); |
104 $hidden = get_hidden_columns( $this->_screen ); |
105 $sortable = array(); |
105 $sortable = array(); |
106 |
106 |
107 return array( $columns, $hidden, $sortable ); |
107 return array( $columns, $hidden, $sortable ); |
108 } |
108 } |
109 |
109 |
110 function get_columns() { |
110 public function get_columns() { |
111 return $this->_columns; |
111 return $this->_columns; |
112 } |
112 } |
113 } |
113 } |