看看get_user_meta 作用
假设用户配置文件中的litecoin地址存储为用户元,键为litecoin_address
您可以这样输出链接:-
$litecoin_address = get_user_meta( get_current_user_id(), \'litecoin_address\', true );
if( !empty( $litecoin_address ) ){
// maybe do some additional sanitation of the litecoin address here
$link = sprintf( \'http://free-liteco.in/?r=%s\', $litecoin_address );
echo $link;
} else {
echo \'Please login and complete the litecoin address in your profile\';
}