WP_MS_Themes_List_Table::column_default() WordPress Method

The WP_MS_Themes_List_Table::column_default() method is used to display the default column value for a particular row in the Multisite Themes table. This method is called by the prepare_items() method for each row in the table. The default column value is retrieved from the $theme_key array based on the $column_name value. The column_default() method allows for customizing the default column value. For example, if the $column_name value is 'theme_name', the column_default() method can be used to display the theme's name instead of the default column value.

WP_MS_Themes_List_Table::column_default( WP_Theme $item, string $column_name ) #

Handles default column output.


Parameters

$item

(WP_Theme)(Required)The current WP_Theme object.

$column_name

(string)(Required)The current column name.


Top ↑

Source

File: wp-admin/includes/class-wp-ms-themes-list-table.php

	public function column_default( $item, $column_name ) {
		/**
		 * Fires inside each custom column of the Multisite themes list table.
		 *
		 * @since 3.1.0
		 *
		 * @param string   $column_name Name of the column.
		 * @param string   $stylesheet  Directory name of the theme.
		 * @param WP_Theme $theme       Current WP_Theme object.
		 */
		do_action(
			'manage_themes_custom_column',
			$column_name,
			$item->get_stylesheet(), // Directory name of the theme.
			$item // Theme object.
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Renamed $theme to $item to match parent class for PHP 8 named parameter support.
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.