Make WordPress Core

Changeset 61717


Ignore:
Timestamp:
02/23/2026 06:05:17 AM (2 months ago)
Author:
westonruter
Message:

Docs: Supply missing documentation in WP_MS_Themes_List_Table.

Developed in https://github.com/WordPress/wordpress-develop/pull/10963

Props noruzzaman, westonruter, huzaifaalmesbah.
See #64224.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r61474 r61717  
    3838     * @see WP_List_Table::__construct() for more information on default arguments.
    3939     *
    40      * @global string $status
    41      * @global int    $page
     40     * @global string $status The current theme status.
     41     * @global int    $page   The current page number.
    4242     *
    4343     * @param array $args An associative array of arguments.
     
    7171
    7272    /**
    73      * @return array
     73     * Gets the list of CSS classes for the table tag.
     74     *
     75     * @return string[] The list of CSS classes.
    7476     */
    7577    protected function get_table_classes() {
     
    7981
    8082    /**
    81      * @return bool
     83     * Checks if the current user has permissions to perform AJAX actions.
     84     *
     85     * @return bool True if the current user has permissions, false otherwise.
    8286     */
    8387    public function ajax_user_can() {
     
    9094
    9195    /**
    92      * @global string $status
    93      * @global array $totals
    94      * @global int $page
    95      * @global string $orderby
    96      * @global string $order
    97      * @global string $s
     96     * Prepares the themes list for display.
     97     *
     98     * @global string             $status  The current theme status.
     99     * @global array<string, int> $totals  An array of theme counts for each status.
     100     * @global int                $page    The current page number.
     101     * @global string             $orderby The column to order the themes list by.
     102     * @global string             $order   The order of the themes list (ASC or DESC).
     103     * @global string             $s       The search string.
    98104     */
    99105    public function prepare_items() {
     
    262268
    263269    /**
    264      * @param WP_Theme $theme
    265      * @return bool
     270     * Filters a theme by the search term.
     271     *
     272     * @param WP_Theme $theme The WP_Theme object to check.
     273     * @return bool True if the theme matches the search term, false otherwise.
    266274     */
    267275    public function _search_callback( $theme ) {
     
    291299    // Not used by any core columns.
    292300    /**
    293      * @global string $orderby
    294      * @global string $order
    295      * @param array $theme_a
    296      * @param array $theme_b
    297      * @return int
     301     * Compares the order of two themes by a specific field.
     302     *
     303     * @global string $orderby The column to order the themes list by.
     304     * @global string $order   The order of the themes list (ASC or DESC).
     305     *
     306     * @param WP_Theme $theme_a The first theme to compare.
     307     * @param WP_Theme $theme_b The second theme to compare.
     308     * @return int 0 if equal, -1 if the first is less than the second, 1 if more.
    298309     */
    299310    public function _order_callback( $theme_a, $theme_b ) {
     
    309320
    310321    /**
     322     * Displays the message when there are no items to list.
    311323     */
    312324    public function no_items() {
     
    319331
    320332    /**
    321      * @return string[] Array of column titles keyed by their column name.
     333     * Gets the list of columns for the list table.
     334     *
     335     * @return array<string, string> Array of column titles keyed by their column name.
    322336     */
    323337    public function get_columns() {
     
    336350
    337351    /**
    338      * @return array
     352     * Gets the list of sortable columns for the list table.
     353     *
     354     * @return array<string, array<int, mixed>> An array of sortable columns.
    339355     */
    340356    protected function get_sortable_columns() {
     
    356372
    357373    /**
    358      * @global array $totals
    359      * @global string $status
    360      * @return array
     374     * Gets the list of views (statuses) for the list table.
     375     *
     376     * @global array<string, int> $totals An array of theme counts for each status.
     377     * @global string             $status The current theme status.
     378     *
     379     * @return array<string, string> The list of views.
    361380     */
    362381    protected function get_views() {
     
    452471
    453472    /**
    454      * @global string $status
    455      *
    456      * @return array
     473     * Gets the list of bulk actions for the list table.
     474     *
     475     * @global string $status The current theme status.
     476     *
     477     * @return array<string, string> The list of bulk actions.
    457478     */
    458479    protected function get_bulk_actions() {
     
    533554     * @since 4.3.0
    534555     *
    535      * @global string $status
    536      * @global int    $page
    537      * @global string $s
     556     * @global string $status The current theme status.
     557     * @global int    $page   The current page number.
     558     * @global string $s      The search string.
    538559     *
    539560     * @param WP_Theme $theme The current WP_Theme object.
     
    690711     * @since 4.3.0
    691712     *
    692      * @global string $status
    693      * @global array  $totals
     713     * @global string             $status The current theme status.
     714     * @global array<string, int> $totals An array of theme counts for each status.
    694715     *
    695716     * @param WP_Theme $theme The current WP_Theme object.
     
    778799     * @since 5.5.0
    779800     *
    780      * @global string $status
    781      * @global int  $page
     801     * @global string $status The current theme status.
     802     * @global int    $page   The current page number.
    782803     *
    783804     * @param WP_Theme $theme The current WP_Theme object.
     
    9801001
    9811002    /**
    982      * @global string $status
    983      * @global array  $totals
    984      *
    985      * @param WP_Theme $theme
     1003     * Handles the output for a single table row.
     1004     *
     1005     * @global string             $status The current theme status.
     1006     * @global array<string, int> $totals An array of theme counts for each status.
     1007     *
     1008     * @param WP_Theme $theme The current WP_Theme object.
    9861009     */
    9871010    public function single_row( $theme ) {
Note: See TracChangeset for help on using the changeset viewer.