mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 02:23:43 +03:00
My pledges: Correct user check for displaying details
This commit is contained in:
parent
e90b06bef9
commit
c247e1325c
|
@ -67,11 +67,11 @@ function get_meta_binding_value( $args, $block ) {
|
||||||
number_format_i18n( absint( $contribution_data['hours'] ) ),
|
number_format_i18n( absint( $contribution_data['hours'] ) ),
|
||||||
);
|
);
|
||||||
case 'user-contribution-details':
|
case 'user-contribution-details':
|
||||||
$user = wp_get_current_user();
|
if ( ! is_user_logged_in() ) {
|
||||||
if ( ! $user ) {
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user = wp_get_current_user();
|
||||||
$profile_data = XProfile\get_contributor_user_data( $user->ID );
|
$profile_data = XProfile\get_contributor_user_data( $user->ID );
|
||||||
|
|
||||||
$contributor_publish_query = new \WP_Query( array(
|
$contributor_publish_query = new \WP_Query( array(
|
||||||
|
|
Loading…
Reference in a new issue