From c247e1325cedbace83f08f85fb9ba88bb8fd6345 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Mon, 2 Sep 2024 19:10:50 -0400 Subject: [PATCH] My pledges: Correct user check for displaying details --- themes/wporg-5ftf-2024/inc/block-bindings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/wporg-5ftf-2024/inc/block-bindings.php b/themes/wporg-5ftf-2024/inc/block-bindings.php index 038be2e..1142af3 100644 --- a/themes/wporg-5ftf-2024/inc/block-bindings.php +++ b/themes/wporg-5ftf-2024/inc/block-bindings.php @@ -67,11 +67,11 @@ function get_meta_binding_value( $args, $block ) { number_format_i18n( absint( $contribution_data['hours'] ) ), ); case 'user-contribution-details': - $user = wp_get_current_user(); - if ( ! $user ) { + if ( ! is_user_logged_in() ) { return ''; } + $user = wp_get_current_user(); $profile_data = XProfile\get_contributor_user_data( $user->ID ); $contributor_publish_query = new \WP_Query( array(