Yoast\WP\SEO\Helpers

User_Helper::delete_meta()publicYoast 1.0

Removes metadata matching criteria from a user.

You can match based on the key, or key and value. Removing based on key and value, will keep from removing duplicate metadata with the same key. It also allows removing all metadata matching key, if needed.

{} Это метод класса: User_Helper{}

Хуков нет.

Возвращает

true|false. True on success, false on failure.

Использование

$User_Helper = new User_Helper();
$User_Helper->delete_meta( $user_id, $meta_key, $meta_value );
$user_id(int) (обязательный)
User ID.
$meta_key(строка) (обязательный)
Metadata name.
$meta_value(разное)
Metadata value. If provided, rows will only be removed that match the value. Must be serializable if non-scalar.
По умолчанию: ''

Код User_Helper::delete_meta() Yoast 19.2

public function delete_meta( $user_id, $meta_key, $meta_value = '' ) {
	return \delete_user_meta( $user_id, $meta_key, $meta_value );
}