Yoast\WP\SEO\Alerts\Application\Indexables_Disabled

Indexables_Disabled_Alert::get_messageprivateYoast 1.0

Returns the notification message as an HTML string.

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

Хуков нет.

Возвращает

Строку. The HTML string representation of the notification.

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

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

Код Indexables_Disabled_Alert::get_message() Yoast 27.7

private function get_message(): string {
	$shortlink = $this->short_link_helper->get( 'https://yoa.st/indexables-disabled' );

	$message = \sprintf(
		/* translators: %1$s expands to "Yoast", %2$s expands to an opening anchor tag, %3$s expands to a closing anchor tag. */
		\esc_html__( '%1$s indexables are disabled because your site is in a non-production environment or custom code is blocking them. This may affect your SEO features. %2$sLearn more about this%3$s.', 'wordpress-seo' ),
		'Yoast',
		'<a href="' . \esc_url( $shortlink ) . '" target="_blank">',
		'</a>',
	);

	return $message;
}