Use new code style
This commit is contained in:
@ -32,8 +32,7 @@ class Customers_Membership_List_Table extends Membership_List_Table {
|
||||
);
|
||||
|
||||
return $columns;
|
||||
|
||||
} // end get_columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the inside column responsive.
|
||||
@ -53,43 +52,47 @@ class Customers_Membership_List_Table extends Membership_List_Table {
|
||||
|
||||
$products_list = $p ? sprintf(_n('Contains %s', 'Contains %1$s and %2$s other product(s)', $product_count, 'wp-ultimo'), $p->get_name(), count($item->get_addon_ids())) : ''; // phpcs:ignore
|
||||
|
||||
echo wu_responsive_table_row(array(
|
||||
'id' => $item->get_id(),
|
||||
'title' => $item->get_hash(),
|
||||
'url' => wu_network_admin_url('wp-ultimo-edit-membership', array(
|
||||
'id' => $item->get_id(),
|
||||
)),
|
||||
'status' => $this->column_status($item),
|
||||
), array(
|
||||
'total' => array(
|
||||
'icon' => 'dashicons-wu-shopping-bag1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Payment Total', 'wp-ultimo'),
|
||||
'value' => $item->get_price_description(),
|
||||
echo wu_responsive_table_row(
|
||||
array(
|
||||
'id' => $item->get_id(),
|
||||
'title' => $item->get_hash(),
|
||||
'url' => wu_network_admin_url(
|
||||
'wp-ultimo-edit-membership',
|
||||
array(
|
||||
'id' => $item->get_id(),
|
||||
)
|
||||
),
|
||||
'status' => $this->column_status($item),
|
||||
),
|
||||
'products' => array(
|
||||
'icon' => 'dashicons-wu-package wu-align-middle wu-mr-1',
|
||||
'label' => __('Products', 'wp-ultimo'),
|
||||
'value' => $products_list,
|
||||
array(
|
||||
'total' => array(
|
||||
'icon' => 'dashicons-wu-shopping-bag1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Payment Total', 'wp-ultimo'),
|
||||
'value' => $item->get_price_description(),
|
||||
),
|
||||
'products' => array(
|
||||
'icon' => 'dashicons-wu-package wu-align-middle wu-mr-1',
|
||||
'label' => __('Products', 'wp-ultimo'),
|
||||
'value' => $products_list,
|
||||
),
|
||||
'gateway' => array(
|
||||
'icon' => 'dashicons-wu-credit-card2 wu-align-middle wu-mr-1',
|
||||
'label' => __('Gateway', 'wp-ultimo'),
|
||||
'value' => wu_slug_to_name($item->get_gateway()),
|
||||
),
|
||||
),
|
||||
'gateway' => array(
|
||||
'icon' => 'dashicons-wu-credit-card2 wu-align-middle wu-mr-1',
|
||||
'label' => __('Gateway', 'wp-ultimo'),
|
||||
'value' => wu_slug_to_name($item->get_gateway()),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'date_expiration' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Expires', 'wp-ultimo'),
|
||||
'value' => sprintf($expired ? __('Expired %s', 'wp-ultimo') : __('Expiring %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_expiration()))),
|
||||
),
|
||||
'date_created' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Created at', 'wp-ultimo'),
|
||||
'value' => sprintf(__('Created %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_created()))),
|
||||
),
|
||||
));
|
||||
|
||||
} // end column_responsive;
|
||||
|
||||
} // end class Customers_Membership_List_Table;
|
||||
array(
|
||||
'date_expiration' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Expires', 'wp-ultimo'),
|
||||
'value' => sprintf($expired ? __('Expired %s', 'wp-ultimo') : __('Expiring %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_expiration()))),
|
||||
),
|
||||
'date_created' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => __('Created at', 'wp-ultimo'),
|
||||
'value' => sprintf(__('Created %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_created()))),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user