Use new code style
This commit is contained in:
@ -32,8 +32,7 @@ class Sites_Domain_List_Table extends Domain_List_Table {
|
||||
);
|
||||
|
||||
return $columns;
|
||||
|
||||
} // end get_columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the inside column responsive.
|
||||
@ -45,34 +44,38 @@ class Sites_Domain_List_Table extends Domain_List_Table {
|
||||
*/
|
||||
public function column_responsive($item) {
|
||||
|
||||
echo wu_responsive_table_row(array(
|
||||
'id' => $item->get_id(),
|
||||
'title' => strtolower((string) $item->get_domain()),
|
||||
'url' => wu_network_admin_url('wp-ultimo-edit-domain', array(
|
||||
'id' => $item->get_id(),
|
||||
)),
|
||||
'status' => $this->column_stage($item),
|
||||
), array(
|
||||
'primary' => array(
|
||||
'icon' => $item->is_primary_domain() ? 'dashicons-wu-filter_1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-plus-square wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_primary_domain() ? __('Primary', 'wp-ultimo') : __('Alias', 'wp-ultimo'),
|
||||
echo wu_responsive_table_row(
|
||||
array(
|
||||
'id' => $item->get_id(),
|
||||
'title' => strtolower((string) $item->get_domain()),
|
||||
'url' => wu_network_admin_url(
|
||||
'wp-ultimo-edit-domain',
|
||||
array(
|
||||
'id' => $item->get_id(),
|
||||
)
|
||||
),
|
||||
'status' => $this->column_stage($item),
|
||||
),
|
||||
'secure' => array(
|
||||
'wrapper_classes' => $item->is_secure() ? 'wu-text-green-500' : '',
|
||||
'icon' => $item->is_secure() ? 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_secure() ? __('Secure (HTTPS)', 'wp-ultimo') : __('Not Secure (HTTP)', 'wp-ultimo'),
|
||||
array(
|
||||
'primary' => array(
|
||||
'icon' => $item->is_primary_domain() ? 'dashicons-wu-filter_1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-plus-square wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_primary_domain() ? __('Primary', 'wp-ultimo') : __('Alias', 'wp-ultimo'),
|
||||
),
|
||||
'secure' => array(
|
||||
'wrapper_classes' => $item->is_secure() ? 'wu-text-green-500' : '',
|
||||
'icon' => $item->is_secure() ? 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_secure() ? __('Secure (HTTPS)', 'wp-ultimo') : __('Not Secure (HTTP)', 'wp-ultimo'),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'date_created' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => sprintf(__('Created %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_created()))),
|
||||
),
|
||||
));
|
||||
|
||||
} // end column_responsive;
|
||||
|
||||
} // end class Sites_Domain_List_Table;
|
||||
array(
|
||||
'date_created' => array(
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => sprintf(__('Created %s', 'wp-ultimo'), wu_human_time_diff(strtotime((string) $item->get_date_created()))),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user