WordPress at Your Fingertips
function is not described

WP_Privacy_Requests_Table::column_status() public WP 4.9.6

Status column.

{} It's a method of the class: WP_Privacy_Requests_Table{}

No Hooks.

Return

String. Status column markup.

Usage

$WP_Privacy_Requests_Table = new WP_Privacy_Requests_Table();
$WP_Privacy_Requests_Table->column_status( $item );
$item(WP_User_Request) (required)
Item being shown.

Changelog

Since 4.9.6 Introduced.

Code of WP_Privacy_Requests_Table::column_status() WP 5.8.2

public function column_status( $item ) {
	$status        = get_post_status( $item->ID );
	$status_object = get_post_status_object( $status );

	if ( ! $status_object || empty( $status_object->label ) ) {
		return '-';
	}

	$timestamp = false;

	switch ( $status ) {
		case 'request-confirmed':
			$timestamp = $item->confirmed_timestamp;
			break;
		case 'request-completed':
			$timestamp = $item->completed_timestamp;
			break;
	}

	echo '<span class="status-label status-' . esc_attr( $status ) . '">';
	echo esc_html( $status_object->label );

	if ( $timestamp ) {
		echo ' (' . $this->get_timestamp_as_date( $timestamp ) . ')';
	}

	echo '</span>';
}