Changeset 15519 for trunk/wp-admin/includes/deprecated.php
- Timestamp:
- 08/22/2010 11:22:46 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/deprecated.php
r15517 r15519 212 212 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 213 213 214 global $_wp_column_headers; 215 216 if ( is_string($screen) ) 217 $screen = convert_to_screen($screen); 218 219 if ( !isset($_wp_column_headers) ) 220 $_wp_column_headers = array(); 221 222 $_wp_column_headers[$screen->id] = $columns; 214 global $wp_list_table; 215 216 $wp_list_table = new _WP_List_Table_Compat($screen); 217 $wp_list_table->_columns = $columns; 223 218 } 224 219 … … 236 231 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 237 232 238 $table = new _WP_List_Table_Compat($screen); 239 list( $columns ) = $table->get_column_headers(); 233 global $wp_list_table; 234 if ( !is_a($wp_list_table, 'WP_List_Table') ) 235 $wp_list_table = new _WP_List_Table_Compat($screen); 236 237 list( $columns ) = $wp_list_table->get_column_headers(); 240 238 241 239 return $columns; … … 252 250 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 253 251 254 $table = new _WP_List_Table_Compat($screen); 255 256 $table->print_column_headers($id); 252 global $wp_list_table; 253 if ( !is_a($wp_list_table, 'WP_List_Table') ) 254 $wp_list_table = new _WP_List_Table_Compat($screen); 255 256 $wp_list_table->print_column_headers($id); 257 257 } 258 258 … … 270 270 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 271 271 272 $table = new _WP_List_Table_Compat($screen); 273 274 return $table->get_hidden_columns(); 272 global $wp_list_table; 273 if ( !is_a($wp_list_table, 'WP_List_Table') ) 274 $wp_list_table = new _WP_List_Table_Compat($screen); 275 276 return $wp_list_table->get_hidden_columns(); 275 277 } 276 278 277 279 // Helper class to be used only by deprecated functions 278 280 class _WP_List_Table_Compat extends WP_List_Table { 281 282 var $_columns = array(); 279 283 280 284 function _WP_List_Table_Compat( $screen) { … … 286 290 287 291 function get_columns() { 288 global $_wp_column_headers; 289 290 if ( isset($_wp_column_headers[$this->_screen->id]) ) 291 return $_wp_column_headers[$this->_screen->id]; 292 293 return array(); 292 return $this->_columns; 294 293 } 295 294 }
Note: See TracChangeset
for help on using the changeset viewer.