wpseo_upsert_new()Yoast 1.0

Insert a new value.

Хуков нет.

Возвращает

Строку.

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

wpseo_upsert_new( $what, $post_id, $new_value, $original );
$what(строка) (обязательный)
Item type (such as title).
$post_id(int) (обязательный)
Post ID.
$new_value(строка) (обязательный)
New value to record.
$original(строка) (обязательный)
Original value.

Код wpseo_upsert_new() Yoast 22.3

function wpseo_upsert_new( $what, $post_id, $new_value, $original ) {
	$meta_key = WPSEO_Meta::$meta_prefix . $what;

	return wpseo_upsert_meta( $post_id, $new_value, $original, $meta_key, $what );
}