Yoast\WP\SEO\Integrations\Admin
Indexing_Notification_Integration::get_presenter() protected Yoast 1.0
Gets the presenter to use to show the notification.
{} Это метод класса: Indexing_Notification_Integration{}
Хуков нет.
Возвращает
Indexing_Failed_Notification_Presenter/Indexing_Notification_Presenter.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_presenter( $reason );
- $reason(строка) (обязательный)
- The reason for the notification.
Код Indexing_Notification_Integration::get_presenter() Indexing Notification Integration::get presenter Yoast 15.6.2
protected function get_presenter( $reason ) {
if ( $reason === Indexing_Reasons::REASON_INDEXING_FAILED ) {
$presenter = new Indexing_Failed_Notification_Presenter( $this->product_helper );
}
else {
$total_unindexed = $this->indexing_helper->get_filtered_unindexed_count();
$presenter = new Indexing_Notification_Presenter( $this->short_link_helper, $total_unindexed, $reason );
}
return $presenter;
}