WPSEO_Slug_Change_Watcher::get_message()protectedYoast 1.0

Returns the message around changed URLs.

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

Хуков нет.

Возвращает

Строку. The full notification.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_message( $first_sentence, $second_sentence );
$first_sentence(строка) (обязательный)
The first sentence of the notification.
$second_sentence(строка) (обязательный)
The second sentence of the notification.

Код WPSEO_Slug_Change_Watcher::get_message() Yoast 22.3

protected function get_message( $first_sentence, $second_sentence ) {
	return '<h2>' . __( 'Make sure you don\'t miss out on traffic!', 'wordpress-seo' ) . '</h2>'
		. '<p>'
		. $first_sentence
		. ' ' . $second_sentence
		. ' ' . __( 'You should create a redirect to ensure your visitors do not get a 404 error when they click on the no longer working URL.', 'wordpress-seo' )
		/* translators: %s expands to Yoast SEO Premium */
		. ' ' . sprintf( __( 'With %s, you can easily create such redirects.', 'wordpress-seo' ), 'Yoast SEO Premium' )
		. '</p>'
		. '<p><a class="yoast-button-upsell" href="' . WPSEO_Shortlinker::get( 'https://yoa.st/1d0' ) . '" target="_blank">'
		/* translators: %s expands to Yoast SEO Premium */
		. sprintf( __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' )
		/* translators: Hidden accessibility text. */
		. '<span class="screen-reader-text">' . __( '(Opens in a new browser tab)', 'wordpress-seo' ) . '</span>'
		. '<span aria-hidden="true" class="yoast-button-upsell__caret"></span>'
		. '</a></p>';
}