Title: WP_MS_Themes_List_Table::get_views
Published: April 25, 2014
Last modified: August 20, 2026

---

# WP_MS_Themes_List_Table::get_views(): array<string,

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#related)

Gets the list of views (statuses) for the list table.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#return)󠁿

 array<string, string> The list of views.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#source)󠁿

    ```php
    protected function get_views() {
    	global $totals, $status;

    	$status_links = array();
    	foreach ( $totals as $type => $count ) {
    		if ( ! $count ) {
    			continue;
    		}

    		switch ( $type ) {
    			case 'all':
    				/* translators: %s: Number of themes. */
    				$text = _nx(
    					'All <span class="count">(%s)</span>',
    					'All <span class="count">(%s)</span>',
    					$count,
    					'themes'
    				);
    				break;
    			case 'enabled':
    				/* translators: %s: Number of themes. */
    				$text = _nx(
    					'Enabled <span class="count">(%s)</span>',
    					'Enabled <span class="count">(%s)</span>',
    					$count,
    					'themes'
    				);
    				break;
    			case 'disabled':
    				/* translators: %s: Number of themes. */
    				$text = _nx(
    					'Disabled <span class="count">(%s)</span>',
    					'Disabled <span class="count">(%s)</span>',
    					$count,
    					'themes'
    				);
    				break;
    			case 'upgrade':
    				/* translators: %s: Number of themes. */
    				$text = _nx(
    					'Update Available <span class="count">(%s)</span>',
    					'Update Available <span class="count">(%s)</span>',
    					$count,
    					'themes'
    				);
    				break;
    			case 'broken':
    				/* translators: %s: Number of themes. */
    				$text = _nx(
    					'Broken <span class="count">(%s)</span>',
    					'Broken <span class="count">(%s)</span>',
    					$count,
    					'themes'
    				);
    				break;
    			case 'auto-update-enabled':
    				/* translators: %s: Number of themes. */
    				$text = _n(
    					'Auto-updates Enabled <span class="count">(%s)</span>',
    					'Auto-updates Enabled <span class="count">(%s)</span>',
    					$count
    				);
    				break;
    			case 'auto-update-disabled':
    				/* translators: %s: Number of themes. */
    				$text = _n(
    					'Auto-updates Disabled <span class="count">(%s)</span>',
    					'Auto-updates Disabled <span class="count">(%s)</span>',
    					$count
    				);
    				break;
    		}

    		if ( $this->is_site_themes ) {
    			$url = 'site-themes.php?id=' . $this->site_id;
    		} else {
    			$url = 'themes.php';
    		}

    		if ( 'search' !== $type ) {
    			$status_links[ $type ] = array(
    				'url'     => esc_url( add_query_arg( 'theme_status', $type, $url ) ),
    				'label'   => sprintf( $text, number_format_i18n( $count ) ),
    				'current' => $type === $status,
    			);
    		}
    	}

    	return $this->get_views_links( $status_links );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-ms-themes-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/class-wp-ms-themes-list-table.php#L381)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-ms-themes-list-table.php#L381-L470)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#related)󠁿

| Uses | Description | 
| [_nx()](https://developer.wordpress.org/reference/functions/_nx/)`wp-includes/l10n.php` |

Translates and retrieves the singular or plural form based on the supplied number, with gettext context.

  | 
| [_n()](https://developer.wordpress.org/reference/functions/_n/)`wp-includes/l10n.php` |

Translates and retrieves the singular or plural form based on the supplied number.

  | 
| [esc_url()](https://developer.wordpress.org/reference/functions/esc_url/)`wp-includes/formatting.php` |

Checks and cleans a URL.

  | 
| [add_query_arg()](https://developer.wordpress.org/reference/functions/add_query_arg/)`wp-includes/functions.php` |

Retrieves a modified URL query string.

  | 
| [number_format_i18n()](https://developer.wordpress.org/reference/functions/number_format_i18n/)`wp-includes/functions.php` |

Converts float number to format based on the locale.

  |

[Show 3 more](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_ms_themes_list_table/get_views/?output_format=md#)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_ms_themes_list_table%2Fget_views%2F)
before being able to contribute a note or feedback.