add method to get profile text content

This commit is contained in:
Evan Mullins 2022-11-30 16:46:21 -05:00
parent 425f33d897
commit d099e72553
2 changed files with 11 additions and 1 deletions

View file

@ -540,6 +540,15 @@ function wasmo_send_admin_email__profile_update( $user_id, $save_count ){
}
}
function wasmo_get_profile_text( $userid ) {
$profile_text = '';
ob_start();
set_query_var( 'userid', $userid );
get_template_part( 'template-parts/content/content', 'usertext' );
$profile_text .= ob_get_clean();
return $profile_text;
}
function wasmo_register_add_meta($user_id) {
add_user_meta( $user_id, 'has_received_welcome', false );
}

View file

@ -2,8 +2,9 @@
/**
* @var $userid
*/
?>
$userid = get_query_var( 'userid' );
?>
<?php if ( get_field( 'hi', 'user_' . $userid ) ) { ?>
<?php echo wp_kses_post( get_field( 'hi', 'user_' . $userid ) ); ?>