WPSEO_Product_Upsell_Notice::get_premium_upsell_section()protectedYoast 1.0

Returns a premium upsell section if using the free plugin.

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_premium_upsell_section();

Код WPSEO_Product_Upsell_Notice::get_premium_upsell_section() Yoast 22.4

protected function get_premium_upsell_section() {
	if ( ! YoastSEO()->helpers->product->is_premium() ) {
		return sprintf(
			/* translators: %1$s expands anchor to premium plugin page, %2$s expands to </a> */
			__( 'By the way, did you know we also have a %1$sPremium plugin%2$s? It offers advanced features, like a redirect manager and support for multiple keyphrases. It also comes with 24/7 personal support.', 'wordpress-seo' ),
			"<a href='" . WPSEO_Shortlinker::get( 'https://yoa.st/premium-notification' ) . "'>",
			'</a>'
		);
	}

	return '';
}