Yoast\WP\SEO\Routes\Endpoint

Endpoint_List::merge_withpublicYoast 1.0

Merges two Endpoint_List objects together. Returns the current instance for method chaining.

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

Хуков нет.

Возвращает

$this.

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

$Endpoint_List = new Endpoint_List();
$Endpoint_List->merge_with( $other_list ): Endpoint_List;
$other_list(Endpoint_List) (обязательный)
The other Endpoint_List to merge with.

Код Endpoint_List::merge_with() Yoast 28.3

public function merge_with( Endpoint_List $other_list ): Endpoint_List {
	foreach ( $other_list->endpoints as $endpoint ) {
		$this->add_endpoint( $endpoint );
	}

	return $this;
}