From 78d95aa459b62a92c8f3e84f246d8fd5c2fe0488 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 1 Nov 2010 08:56:27 +0000 Subject: [PATCH] Split out the list table functions into a seperate file from the base class. See #14579. git-svn-id: https://develop.svn.wordpress.org/trunk@16127 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/admin.php | 3 +- wp-admin/includes/class-wp-list-table.php | 56 +------------------- wp-admin/includes/list-table.php | 63 +++++++++++++++++++++++ 3 files changed, 66 insertions(+), 56 deletions(-) create mode 100644 wp-admin/includes/list-table.php diff --git a/wp-admin/includes/admin.php b/wp-admin/includes/admin.php index b3d74e2b8f..1849ed3f59 100644 --- a/wp-admin/includes/admin.php +++ b/wp-admin/includes/admin.php @@ -39,7 +39,8 @@ require_once(ABSPATH . 'wp-admin/includes/taxonomy.php'); /** WordPress Template Administration API */ require_once(ABSPATH . 'wp-admin/includes/template.php'); -/** WordPress List Table Administration API */ +/** WordPress List Table Administration API and base class */ +require_once(ABSPATH . 'wp-admin/includes/list-table.php'); require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); /** WordPress Theme Administration API */ diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 09be36380c..25d8277786 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -1,6 +1,6 @@ 'posts', - 'WP_Media_Table' => 'media', - 'WP_Terms_Table' => 'terms', - 'WP_Users_Table' => 'users', - 'WP_Comments_Table' => 'comments', - 'WP_Post_Comments_Table' => 'comments', - 'WP_Links_Table' => 'links', - 'WP_Sites_Table' => 'sites', - 'WP_MS_Users_Table' => 'ms-users', - 'WP_Plugins_Table' => 'plugins', - 'WP_Plugin_Install_Table' => 'plugin-install', - 'WP_Themes_Table' => 'themes', - 'WP_Theme_Install_Table' => 'theme-install', - 'WP_MS_Themes_Table' => 'ms-themes', - ); - - if ( isset( $core_classes[ $class ] ) ) { - require_once( ABSPATH . '/wp-admin/includes/list-table-' . $core_classes[ $class ] . '.php' ); - return true; - } - return false; -} - ?> diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php new file mode 100644 index 0000000000..035974468b --- /dev/null +++ b/wp-admin/includes/list-table.php @@ -0,0 +1,63 @@ + 'posts', + 'WP_Media_Table' => 'media', + 'WP_Terms_Table' => 'terms', + 'WP_Users_Table' => 'users', + 'WP_Comments_Table' => 'comments', + 'WP_Post_Comments_Table' => 'comments', + 'WP_Links_Table' => 'links', + 'WP_Sites_Table' => 'sites', + 'WP_MS_Users_Table' => 'ms-users', + 'WP_Plugins_Table' => 'plugins', + 'WP_Plugin_Install_Table' => 'plugin-install', + 'WP_Themes_Table' => 'themes', + 'WP_Theme_Install_Table' => 'theme-install', + 'WP_MS_Themes_Table' => 'ms-themes', + ); + + if ( isset( $core_classes[ $class ] ) ) { + require_once( ABSPATH . '/wp-admin/includes/list-table-' . $core_classes[ $class ] . '.php' ); + return true; + } + return false; +} + +?>