WPSEO_Addon_Manager::get_banners()protectedYoast 1.0

Return an array of plugin banner URLs.

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

Хуков нет.

Возвращает

Строку[].

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_banners( $slug );
$slug(строка) (обязательный)
The plugin slug.

Код WPSEO_Addon_Manager::get_banners() Yoast 22.4

protected function get_banners( $slug ) {
	switch ( $slug ) {
		case self::LOCAL_SLUG:
			return [
				'high' => 'https://yoa.st/yoast-seo-banner-local',
				'low'  => 'https://yoa.st/yoast-seo-banner-low-local',
			];
		case self::NEWS_SLUG:
			return [
				'high' => 'https://yoa.st/yoast-seo-banner-news',
				'low'  => 'https://yoa.st/yoast-seo-banner-low-news',
			];
		case self::PREMIUM_SLUG:
			return [
				'high' => 'https://yoa.st/yoast-seo-banner-premium',
				'low'  => 'https://yoa.st/yoast-seo-banner-low-premium',
			];
		case self::VIDEO_SLUG:
			return [
				'high' => 'https://yoa.st/yoast-seo-banner-video',
				'low'  => 'https://yoa.st/yoast-seo-banner-low-video',
			];
		case self::WOOCOMMERCE_SLUG:
			return [
				'high' => 'https://yoa.st/yoast-seo-banner-woo',
				'low'  => 'https://yoa.st/yoast-seo-banner-low-woo',
			];
	}
}