Wordpress是否在用户配置文件仪表板上显示自定义USERMETA字段?
我从Wordpress是否在用户配置文件仪表板上显示自定义USERMETA字段?,wordpress,customization,profile,dashboard,custom-fields,Wordpress,Customization,Profile,Dashboard,Custom Fields,我从wp\u USERMETA表中添加并使用了一个USERMETA字段(称为:user\u custom\u hash)。表示我已从代码中的某个位置插入/编辑/删除字段 之前不需要显示它。 所以现在 如何在Wordpress管理仪表板的用户配置文件页面上显示此USERMETA字段?(我是指管理仪表板上的“编辑用户”页面。) 例如: 自定义散列键:\uuuu239cc68ba2423ddf67dcfcd4aa2fa83b 我的意思是,在这里的某个地方展示: 注意: Wordpress当前
wp\u USERMETA
表中添加并使用了一个USERMETA字段(称为:user\u custom\u hash
)。表示我已从代码中的某个位置插入/编辑
/删除
字段
之前不需要显示它。所以现在
- 如何在Wordpress管理仪表板的用户配置文件页面上显示此
字段?(我是指管理仪表板上的“编辑用户”页面。)USERMETA
自定义散列键:\uuuu239cc68ba2423ddf67dcfcd4aa2fa83b
注意:
Wordpress当前版本:3.5.0
现在可以了,因为我自己得到了,如下所示:
add_action( 'show_user_profile', 'display_user_custom_hash' );
add_action( 'edit_user_profile', 'display_user_custom_hash' );
function display_user_custom_hash( $user ) { ?>
<h3>USERMETA Fields</h3>
<table class="form-table">
<tr>
<th><label>Custom Hash Key</label></th>
<td><input type="text" value="<?php echo get_user_meta( $user->ID, 'user_custom_hash', true ); ?>" class="regular-text" readonly=readonly /></td>
</tr>
</table>
<?php
}
add_操作('show_user_profile'、'display_user_custom_hash');
添加操作(“编辑用户配置文件”、“显示用户自定义散列”);
函数显示\用户\自定义\哈希($user){?>
用户元字段
自定义哈希键