Summery Summery
Status column.
Syntax Syntax
Parameters Parameters
- $item
-
(Required) Item being shown.
Return Return
(string) Status column markup.
Source Source
File: wp-admin/includes/class-wp-privacy-requests-table.php
* * @param WP_User_Request $item Item being shown. * @return string Status column markup. */ 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 ) . ')';
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.9.6 | Introduced. |