|
|
|
|
@@ -203,9 +203,42 @@ function use_codepress() {
|
|
|
|
|
* @since 2.7.0
|
|
|
|
|
* @deprecated 3.1.0
|
|
|
|
|
* @deprecated Use WP_List_Table
|
|
|
|
|
*
|
|
|
|
|
* @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
|
|
|
|
|
* @param array $columns An array of columns with column IDs as the keys and translated column names as the values
|
|
|
|
|
* @see get_column_headers(), print_column_headers(), get_hidden_columns()
|
|
|
|
|
*/
|
|
|
|
|
function register_column_headers() {
|
|
|
|
|
function register_column_headers($screen, $columns) {
|
|
|
|
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
|
|
|
|
|
|
|
|
|
global $_wp_column_headers;
|
|
|
|
|
|
|
|
|
|
if ( is_string($screen) )
|
|
|
|
|
$screen = convert_to_screen($screen);
|
|
|
|
|
|
|
|
|
|
if ( !isset($_wp_column_headers) )
|
|
|
|
|
$_wp_column_headers = array();
|
|
|
|
|
|
|
|
|
|
$_wp_column_headers[$screen->id] = $columns;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the column headers for a screen
|
|
|
|
|
*
|
|
|
|
|
* @since 2.7.0
|
|
|
|
|
* @deprecated 3.1.0
|
|
|
|
|
* @deprecated Use WP_List_Table
|
|
|
|
|
*
|
|
|
|
|
* @param string|object $screen The screen you want the headers for
|
|
|
|
|
* @return array Containing the headers in the format id => UI String
|
|
|
|
|
*/
|
|
|
|
|
function get_column_headers($screen) {
|
|
|
|
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
|
|
|
|
|
|
|
|
|
$table = new _WP_List_Table_Compat($screen);
|
|
|
|
|
list( $columns ) = $table->get_column_headers();
|
|
|
|
|
|
|
|
|
|
return $columns;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -215,19 +248,49 @@ function register_column_headers() {
|
|
|
|
|
* @deprecated 3.1.0
|
|
|
|
|
* @deprecated Use WP_List_Table
|
|
|
|
|
*/
|
|
|
|
|
function print_column_headers() {
|
|
|
|
|
function print_column_headers($screen, $id = true) {
|
|
|
|
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
|
|
|
|
|
|
|
|
|
$table = new _WP_List_Table_Compat($screen);
|
|
|
|
|
|
|
|
|
|
$table->print_column_headers($id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets hidden column names for a particular screen.
|
|
|
|
|
*
|
|
|
|
|
* @since unknown
|
|
|
|
|
* @since 2.7.0
|
|
|
|
|
* @deprecated 3.1.0
|
|
|
|
|
* @deprecated Use WP_List_Table
|
|
|
|
|
*
|
|
|
|
|
* @param string $screen
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
function get_hidden_columns() {
|
|
|
|
|
function get_hidden_columns($screen) {
|
|
|
|
|
_deprecated_function( __FUNCTION__, '3.1', 'WP_List_Table' );
|
|
|
|
|
return array();
|
|
|
|
|
|
|
|
|
|
$table = new _WP_List_Table_Compat($screen);
|
|
|
|
|
|
|
|
|
|
return $table->get_hidden_columns();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Helper class to be used only by deprecated functions
|
|
|
|
|
class _WP_List_Table_Compat extends WP_List_Table {
|
|
|
|
|
|
|
|
|
|
function _WP_List_Table_Compat( $screen) {
|
|
|
|
|
parent::WP_List_Table( array(
|
|
|
|
|
'screen' => $screen,
|
|
|
|
|
'ajax' => false
|
|
|
|
|
) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function get_columns() {
|
|
|
|
|
global $_wp_column_headers;
|
|
|
|
|
|
|
|
|
|
if ( isset($_wp_column_headers[$this->_screen->id]) )
|
|
|
|
|
return $_wp_column_headers[$this->_screen->id];
|
|
|
|
|
|
|
|
|
|
return array();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|