WordPress 中文文档
Function Reference/get usermeta
From WordPress Chinese
目录 |
[编辑]
Description
This function returns the value of a specific metakey pertaining to the user whose ID is passed via the userid parameter.
[编辑]
Usage
%%% <?php get_usermeta(userid,'metakey'); ?> %%%
[编辑]
Example
This example returns and then displays the last name for user id 9.
<?php $user_last = get_usermeta(9,'last_name'); ?>
<?php echo('User ID 9's last name: ' . $user_last . '\n'); ?>
User ID 9's last name: Jones
[编辑]
