Yoast\WP\SEO\Presenters\Admin
Indexing_Notification_Presenter::get_message()
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 24.7
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; case Indexing_Reasons::REASON_POST_TYPE_MADE_PUBLIC: $text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your post types. Please help us do that by running the SEO data optimization.', 'wordpress-seo' ); break; case Indexing_Reasons::REASON_TAXONOMY_MADE_PUBLIC: $text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your taxonomies. Please help us do that by running the SEO data optimization.', 'wordpress-seo' ); break; case Indexing_Reasons::REASON_ATTACHMENTS_MADE_ENABLED: $text = \esc_html__( 'It looks like you\'ve enabled media pages. We recommend that you help us to re-analyze your site by running the SEO data optimization.', '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 ); }