Changeset 15517
- Timestamp:
- 08/21/2010 06:08:42 PM (14 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/admin.php
r12824 r15517 40 40 require_once(ABSPATH . 'wp-admin/includes/template.php'); 41 41 42 /** WordPress List Table Administration API */ 43 require_once(ABSPATH . 'wp-admin/includes/list-table.php'); 44 42 45 /** WordPress Theme Administration API */ 43 46 require_once(ABSPATH . 'wp-admin/includes/theme.php'); -
trunk/wp-admin/includes/default-list-tables.php
r15513 r15517 1 1 <?php 2 3 require_once('list-table.php');4 2 5 3 /** -
trunk/wp-admin/includes/deprecated.php
r15515 r15517 204 204 * @deprecated 3.1.0 205 205 * @deprecated Use WP_List_Table 206 */ 207 function register_column_headers() { 208 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 206 * 207 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. 208 * @param array $columns An array of columns with column IDs as the keys and translated column names as the values 209 * @see get_column_headers(), print_column_headers(), get_hidden_columns() 210 */ 211 function register_column_headers($screen, $columns) { 212 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 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; 223 } 224 225 /** 226 * Get the column headers for a screen 227 * 228 * @since 2.7.0 229 * @deprecated 3.1.0 230 * @deprecated Use WP_List_Table 231 * 232 * @param string|object $screen The screen you want the headers for 233 * @return array Containing the headers in the format id => UI String 234 */ 235 function get_column_headers($screen) { 236 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 237 238 $table = new _WP_List_Table_Compat($screen); 239 list( $columns ) = $table->get_column_headers(); 240 241 return $columns; 209 242 } 210 243 … … 216 249 * @deprecated Use WP_List_Table 217 250 */ 218 function print_column_headers() { 219 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 251 function print_column_headers($screen, $id = true) { 252 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 253 254 $table = new _WP_List_Table_Compat($screen); 255 256 $table->print_column_headers($id); 220 257 } 221 258 … … 223 260 * Gets hidden column names for a particular screen. 224 261 * 225 * @since unknown 226 * @deprecated 3.1.0 227 * @deprecated Use WP_List_Table 228 */ 229 function get_hidden_columns() { 230 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 231 return array(); 232 } 233 262 * @since 2.7.0 263 * @deprecated 3.1.0 264 * @deprecated Use WP_List_Table 265 * 266 * @param string $screen 267 * @return array 268 */ 269 function get_hidden_columns($screen) { 270 _deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' ); 271 272 $table = new _WP_List_Table_Compat($screen); 273 274 return $table->get_hidden_columns(); 275 } 276 277 // Helper class to be used only by deprecated functions 278 class _WP_List_Table_Compat extends WP_List_Table { 279 280 function _WP_List_Table_Compat( $screen) { 281 parent::WP_List_Table( array( 282 'screen' => $screen, 283 'ajax' => false 284 ) ); 285 } 286 287 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(); 294 } 295 } 296 -
trunk/wp-admin/includes/list-table.php
r15516 r15517 459 459 * @since 3.1.0 460 460 * @access protected 461 * 462 * @param bool $with_id Wether to set the id attribute or not 461 463 */ 462 464 function print_column_headers( $with_id = true ) {
Note: See TracChangeset
for help on using the changeset viewer.