From b67997988a4992043966acc4805eae8d53c0f647 Mon Sep 17 00:00:00 2001 From: Bill Van Pelt Date: Wed, 21 Feb 2024 10:50:57 -0500 Subject: [PATCH] fixing lint errors --- includes/core/classes/class-event.php | 10 +++--- includes/templates/admin/user/date-time.php | 40 ++++++++++----------- src/components/RsvpResponse.js | 2 +- src/components/RsvpResponseCard.js | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 958e1a0cb..6797efe31 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -247,7 +247,7 @@ public function get_display_datetime(): string { $timezone = $settings->get_value( 'general', 'formatting', 'show_timezone' ) ? ' T' : ''; // If there is a user and they have custom date/time formats, use those. - if ($user_id) { + if ( $user_id ) { $date_format = get_user_meta( $user_id, 'gp_date_format', true ) ?? $date_format; $time_format = get_user_meta( $user_id, 'gp_time_format', true ) ?? $time_format; } @@ -557,8 +557,8 @@ public function get_datetime(): array { global $wpdb; // Get the users timezone from the profile. - $user_id = get_current_user_id(); - $gp_timezone = esc_attr( get_user_meta( $user_id, 'gp_timezone', true ) ); + $user_id = get_current_user_id(); + $gp_timezone = esc_attr( get_user_meta( $user_id, 'gp_timezone', true ) ); $default = array( 'datetime_start' => '', @@ -584,8 +584,8 @@ public function get_datetime(): array { } // If not in an admin page, use the user's timezone if set. - if ( ! is_admin() && $user_id && !empty( $gp_timezone ) ) { - $data['timezone'] = !empty( $gp_timezone ) ? $gp_timezone : $data['timezone']; + if ( ! is_admin() && $user_id && ! empty( $gp_timezone ) ) { + $data['timezone'] = ! empty( $gp_timezone ) ? $gp_timezone : $data['timezone']; } return array_merge( diff --git a/includes/templates/admin/user/date-time.php b/includes/templates/admin/user/date-time.php index 5763f0b35..0a11dd9df 100644 --- a/includes/templates/admin/user/date-time.php +++ b/includes/templates/admin/user/date-time.php @@ -12,14 +12,14 @@ return; } -$tz_choices = Utility::timezone_choices(); +$gatherpress_tz_choices = Utility::timezone_choices(); -$date_attrs = array( +$gatherpress_date_attrs = array( 'name' => 'gp_date_format', 'value' => ! empty( $date_format ) ? $date_format : '', ); -$time_attrs = array( +$gatherpress_time_attrs = array( 'name' => 'gp_time_format', 'value' => ! empty( $time_format ) ? $time_format : '', ); @@ -29,52 +29,52 @@
- Documentation on date and time formatting.', 'gatherpress' ); ?> + Documentation on date and time formatting.', 'gatherpress' ); ?>
- + + - +
- +

- : - + : +

-
- +

- : - + : +

diff --git a/src/components/RsvpResponse.js b/src/components/RsvpResponse.js index 436bd42f8..91ed1eba1 100644 --- a/src/components/RsvpResponse.js +++ b/src/components/RsvpResponse.js @@ -50,7 +50,7 @@ const RsvpResponse = () => { 'Not Attending', 'responded not attending', 'gatherpress' - ) + ) : __("Didn't Go", 'gatherpress'), value: 'not_attending', }, diff --git a/src/components/RsvpResponseCard.js b/src/components/RsvpResponseCard.js index bd3ea2ba0..824151333 100644 --- a/src/components/RsvpResponseCard.js +++ b/src/components/RsvpResponseCard.js @@ -90,7 +90,7 @@ const RsvpResponseCard = ({ value, limit, responses = [] }) => { ? __( 'No one is attending this event yet.', 'gatherpress' - ) + ) : __('No one went to this event.', 'gatherpress')} )}