WPSEO_Statistics_Service::statistic_items()privateYoast 1.0

An array representing items to be added to the At a Glance dashboard widget.

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

Хуков нет.

Возвращает

Массив. The statistics for the current user.

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

// private - только в коде основоного (родительского) класса
$result = $this->statistic_items();

Код WPSEO_Statistics_Service::statistic_items() Yoast 22.4

private function statistic_items() {
	$transient = $this->get_transient();
	$user_id   = get_current_user_id();

	if ( isset( $transient[ $user_id ] ) ) {
		return $transient[ $user_id ];
	}

	return $this->set_statistic_items_for_user( $transient, $user_id );
}