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 24.0

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" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" 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>';
}