Yoast\WP\SEO\Repositories

Indexable_Repository::update_incoming_link_count()publicYoast 1.0

Updates the incoming link count for an indexable without first fetching it.

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

Хуков нет.

Возвращает

true|false. Whether or not the update was succeful.

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

$Indexable_Repository = new Indexable_Repository();
$Indexable_Repository->update_incoming_link_count( $indexable_id, $count );
$indexable_id(int) (обязательный)
The indexable id.
$count(int) (обязательный)
The incoming link count.

Код Indexable_Repository::update_incoming_link_count() Yoast 19.11

public function update_incoming_link_count( $indexable_id, $count ) {
	return (bool) $this->query()
		->set( 'incoming_link_count', $count )
		->where( 'id', $indexable_id )
		->update_many();
}