WordPress:Function Reference/delete usermeta

来自站长百科
Fludlen讨论 | 贡献2008年7月21日 (一) 09:45的版本
跳转至: 导航、​ 搜索

Description

描述

Removes a user meta record from the wp_usermeta database table for a specific user ID.

wp_usermeta数据库表格中返回某个用户ID的meta 记录。

Usage

用法

%%% <?php delete_usermeta($user_id, $meta_key, $meta_value); ?> %%%

%%% <?php delete_usermeta($user_id, $meta_key, $meta_value); ?> %%%

Example

例子

%%%<?php if (delete_usermeta(7, 'first_name')) {

   echo 'User meta key successfully removed!';

} else {

   echo 'User meta record could not be removed!';

} ?> %%%

%%%<?php if (delete_usermeta(7, 'first_name')) {

   echo '用户 meta 关键字 成功地移除了!';

} else {

   echo '用户 meta 记录不能够移除!';

} ?> %%%

Parameters

参数