diff --git a/plugins/wporg-5ftf/includes/xprofile.php b/plugins/wporg-5ftf/includes/xprofile.php index 237726d..946e46a 100644 --- a/plugins/wporg-5ftf/includes/xprofile.php +++ b/plugins/wporg-5ftf/includes/xprofile.php @@ -101,6 +101,11 @@ function get_contributor_user_data( $user_id ) { $formatted_data = array(); $raw_data = get_xprofile_contribution_data( array( $user_id ) ); + $defaults = array( + 'hours_per_week' => 0, + 'team_names' => array(), + ); + foreach ( $raw_data as $datum ) { $key = array_search( $datum['field_id'], FIELD_IDS ); @@ -114,5 +119,7 @@ function get_contributor_user_data( $user_id ) { } } + $formatted_data = array_merge( $defaults, $formatted_data ); + return $formatted_data; } diff --git a/plugins/wporg-5ftf/views/list-my-pledges.php b/plugins/wporg-5ftf/views/list-my-pledges.php index f44b1c1..9d18b97 100644 --- a/plugins/wporg-5ftf/views/list-my-pledges.php +++ b/plugins/wporg-5ftf/views/list-my-pledges.php @@ -30,18 +30,31 @@ $has_contributions = $contributor_pending_posts || $contributor_publish_posts; -
- -
+ ++ +
+ + ++ update your profile with the number of hours per week that you contribute, and the teams that you contribute to.', 'wporg-5ftf' ), + 'https://profiles.wordpress.org/me/profile/edit/group/5/' + ) ); ?> +
+