You appear to be a bot. Output may be restricted
Description
This function renders most of the columns in the list table.
Usage
$string = EDD_File_Downloads_Log_Table::column_default( $item, $column_name );
Parameters
- $item
- ( array ) required – Contains all the data of the log item.
- $column_name
- ( string ) required – The name of the column.
Returns
string Column Name
Source
File name: easy-digital-downloads/includes/admin/reporting/class-file-downloads-logs-list-table.php
Lines:
1 to 31 of 31
public function column_default( $item, $column_name ) { $base_url = remove_query_arg( 'paged' ); switch ( $column_name ) { case 'download' : $download = new EDD_Download( $item[ $column_name ] ); $column_value = ! empty( $item['price_id'] ) ? edd_get_download_name( $download->ID, $item['price_id'] ) : edd_get_download_name( $download->ID ); return '<a href="' . esc_url( add_query_arg( 'download', absint( $download->ID ), $base_url ) ) . '" >' . esc_html( $column_value ) . '</a>'; case 'customer' : return ! empty( $item[ 'customer' ]->id ) ? '<a href="' . esc_url( add_query_arg( 'customer', absint( $item['customer']->id ), $base_url ) ) . '">' . esc_html( $item['customer']->name ) . '</a>' : '—'; case 'payment_id' : $number = edd_get_payment_number( $item['payment_id'] ); return ! empty( $number ) ? '<a href="' . esc_url( edd_get_admin_url( array( 'page' => 'edd-payment-history', 'view' => 'view-order-details', 'id' => absint( $item['payment_id'] ) ) ) ) . '">' . esc_html( $number ) . '</a>' : '—'; case 'ip' : return '<a href="' . esc_url( 'https://ipinfo.io/' . esc_attr( $item['ip'] ) ) . '" target="_blank" rel="noopener noreferrer">' . esc_html( $item['ip'] ) . '</a>'; case 'file': return ! empty( $item['file'] ) ? esc_html( $item['file'] ) : '—'; default: return $item[ $column_name ]; } }