Yoast\WP\SEO\Presenters\Admin
Indexing_Notification_Presenter::get_message() protected Yoast 1.0
Determines the message to show in the indexing notification.
{} Это метод класса: Indexing_Notification_Presenter{}
Хуки из метода
Возвращает
Строку. The message to show in the notification.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_message( $reason );
- $reason(строка) (обязательный)
- The reason identifier.
Код Indexing_Notification_Presenter::get_message() Indexing Notification Presenter::get message Yoast 15.6.2
protected function get_message( $reason ) {
switch ( $reason ) {
case Indexing_Reasons::REASON_PERMALINK_SETTINGS:
$text = \esc_html__( 'Because of a change in your permalink structure, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_HOME_URL_OPTION:
$text = \esc_html__( 'Because of a change in your home URL setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_CATEGORY_BASE_PREFIX:
$text = \esc_html__( 'Because of a change in your category base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_TAG_BASE_PREFIX:
$text = \esc_html__( 'Because of a change in your tag base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
default:
$text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. ', 'wordpress-seo' );
}
/**
* Filter: 'wpseo_indexables_indexation_alert' - Allow developers to filter the reason of the indexation
*
* @param string $text The text to show as reason.
* @param string $reason The reason value.
*/
return (string) \apply_filters( 'wpseo_indexables_indexation_alert', $text, $reason );
}