WPSEO_Meta::delete()public staticYoast 1.0

Deletes a meta value for a post.

Метод класса: WPSEO_Meta{}

Хуков нет.

Возвращает

true|false. Whether the delete was successful or not.

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

$result = WPSEO_Meta::delete( $key, $post_id );
$key(строка) (обязательный)
The internal key of the meta value to change (without prefix).
$post_id(int) (обязательный)
The ID of the post to delete the meta for.

Код WPSEO_Meta::delete() Yoast 22.4

public static function delete( $key, $post_id ) {
	return delete_post_meta( $post_id, self::$meta_prefix . $key );
}