Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -27,9 +27,9 @@ class Inside_Events_List_Table extends Event_List_Table {
*/
public function get_columns() {
$columns = array(
$columns = [
'responsive' => '',
);
];
return $columns;
}
@ -42,20 +42,20 @@ class Inside_Events_List_Table extends Event_List_Table {
* @param object $item The item being rendered.
* @return void
*/
public function column_responsive($item) {
public function column_responsive($item): void {
$first_row = array(
'id' => array(
$first_row = [
'id' => [
'icon' => 'dashicons-wu-hash wu-align-middle wu-mr-1',
'label' => __('Event ID', 'wp-ultimo'),
'value' => $item->get_id(),
),
'slug' => array(
],
'slug' => [
'icon' => 'dashicons-wu-bookmark1 wu-align-middle wu-mr-1',
'label' => __('Event Type', 'wp-ultimo'),
'value' => wu_slug_to_name($item->get_slug()),
),
);
],
];
$object_initiator = $item->get_initiator();
@ -67,10 +67,10 @@ class Inside_Events_List_Table extends Event_List_Table {
16,
'identicon',
'',
array(
[
'force_display' => true,
'class' => 'wu-rounded-full wu-mr-1 wu-align-text-bottom',
)
]
);
$display_name = $item->get_author_display_name();
@ -79,25 +79,25 @@ class Inside_Events_List_Table extends Event_List_Table {
}
echo wu_responsive_table_row(
array(
[
'id' => '',
'title' => sprintf('<span class="wu-font-normal">%s</span>', wp_trim_words($item->get_message(), 15)),
'url' => wu_network_admin_url(
'wp-ultimo-view-event',
array(
[
'id' => $item->get_id(),
)
]
),
'status' => $value,
),
],
$first_row,
array(
'date_created' => array(
[
'date_created' => [
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
'label' => '',
'value' => sprintf(__('Processed %s', 'wp-ultimo'), wu_human_time_diff($item->get_date_created(), '-1 day')),
),
)
],
]
);
}
}