diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index 37caa4b361dbf..91d868a53a095 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -37,8 +37,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { * * @see WP_List_Table::__construct() for more information on default arguments. * - * @global string $status - * @global int $page + * @global string $status The current theme status. + * @global int $page The current page number. * * @param array $args An associative array of arguments. */ @@ -70,7 +70,9 @@ public function __construct( $args = array() ) { } /** - * @return array + * Gets the list of CSS classes for the table tag. + * + * @return string[] The list of CSS classes. */ protected function get_table_classes() { // @todo Remove and add CSS for .themes. @@ -78,7 +80,9 @@ protected function get_table_classes() { } /** - * @return bool + * Checks if the current user has permissions to perform AJAX actions. + * + * @return bool True if the current user has permissions, false otherwise. */ public function ajax_user_can() { if ( $this->is_site_themes ) { @@ -89,12 +93,14 @@ public function ajax_user_can() { } /** - * @global string $status - * @global array $totals - * @global int $page - * @global string $orderby - * @global string $order - * @global string $s + * Prepares the themes list for display. + * + * @global string $status The current theme status. + * @global array $totals An array of theme counts for each status. + * @global int $page The current page number. + * @global string $orderby The column to order the themes list by. + * @global string $order The order of the themes list (ASC or DESC). + * @global string $s The search string. */ public function prepare_items() { global $status, $totals, $page, $orderby, $order, $s; @@ -261,8 +267,10 @@ public function prepare_items() { } /** - * @param WP_Theme $theme - * @return bool + * Helper to filter themes by search term. + * + * @param WP_Theme $theme The WP_Theme object to check. + * @return bool True if the theme matches the search term, false otherwise. */ public function _search_callback( $theme ) { static $term = null; @@ -290,11 +298,14 @@ public function _search_callback( $theme ) { // Not used by any core columns. /** - * @global string $orderby - * @global string $order - * @param array $theme_a - * @param array $theme_b - * @return int + * Helper to sort themes by a specific field. + * + * @global string $orderby The column to order the themes list by. + * @global string $order The order of the themes list (ASC or DESC). + * + * @param array $theme_a The first theme to compare. + * @param array $theme_b The second theme to compare. + * @return int 0 if equal, -1 if the first is less than the second, 1 if more. */ public function _order_callback( $theme_a, $theme_b ) { global $orderby, $order; @@ -308,6 +319,7 @@ public function _order_callback( $theme_a, $theme_b ) { } /** + * Displays the message to be displayed when there are no items to list. */ public function no_items() { if ( $this->has_items ) { @@ -318,6 +330,8 @@ public function no_items() { } /** + * Gets the list of columns for the list table. + * * @return string[] Array of column titles keyed by their column name. */ public function get_columns() { @@ -335,7 +349,9 @@ public function get_columns() { } /** - * @return array + * Gets the list of sortable columns for the list table. + * + * @return array> An array of sortable columns. */ protected function get_sortable_columns() { return array( @@ -355,9 +371,12 @@ protected function get_primary_column_name() { } /** - * @global array $totals - * @global string $status - * @return array + * Gets the list of views (statuses) for the list table. + * + * @global array $totals An array of theme counts for each status. + * @global string $status The current theme status. + * + * @return array The list of views. */ protected function get_views() { global $totals, $status; @@ -451,9 +470,11 @@ protected function get_views() { } /** - * @global string $status + * Gets the list of bulk actions for the list table. + * + * @global string $status The current theme status. * - * @return array + * @return array The list of bulk actions. */ protected function get_bulk_actions() { global $status; @@ -532,9 +553,9 @@ public function column_cb( $item ) { * * @since 4.3.0 * - * @global string $status - * @global int $page - * @global string $s + * @global string $status The current theme status. + * @global int $page The current page number. + * @global string $s The search string. * * @param WP_Theme $theme The current WP_Theme object. */ @@ -689,8 +710,8 @@ public function column_name( $theme ) { * * @since 4.3.0 * - * @global string $status - * @global array $totals + * @global string $status The current theme status. + * @global array $totals An array of theme counts for each status. * * @param WP_Theme $theme The current WP_Theme object. */ @@ -777,8 +798,8 @@ public function column_description( $theme ) { * * @since 5.5.0 * - * @global string $status - * @global int $page + * @global string $status The current theme status. + * @global int $page The current page number. * * @param WP_Theme $theme The current WP_Theme object. */ @@ -979,10 +1000,12 @@ public function single_row_columns( $item ) { } /** - * @global string $status - * @global array $totals + * Handles the output for a single table row. + * + * @global string $status The current theme status. + * @global array $totals An array of theme counts for each status. * - * @param WP_Theme $theme + * @param WP_Theme $theme The current WP_Theme object. */ public function single_row( $theme ) { global $status, $totals;