/** * Renders the admin banner spot. * * @param WPSEO_Admin_Banner_Spot $banner_spot The spot to render. * * @return string */ public function render(WPSEO_Admin_Banner_Spot $banner_spot) { $output = '<div class="yoast-sidebar__spot"><strong>' . $banner_spot->get_title() . '</strong>'; if ($banner_spot->get_description() !== '') { $output .= '<p>' . $banner_spot->get_description() . '</p>'; } $output .= $banner_spot->render_banner(); $output .= '</div>'; return $output; }
/** * Returns two random selected plugin banners. * * @return WPSEO_Admin_Banner_Spot */ private function get_plugin_banners() { $plugin_banners = new WPSEO_Admin_Banner_Spot(__('Extensions', 'wordpress-seo'), sprintf(__('Extend your %1$s plugin with our %2$sSEO plugins%3$s.', 'wordpress-seo'), 'Yoast SEO', '<a href="https://yoa.st/">', '</a>')); $plugin_banners->add_banner(new WPSEO_Admin_Banner('https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=premium-seo-banner', 'banner-premium-seo.png', 261, 152, __('Buy the Yoast SEO Premium plugin now and get access to extra features and 24/7 support!', 'wordpress-seo'))); if (!class_exists('wpseo_Video_Sitemap')) { $plugin_banners->add_banner(new WPSEO_Admin_Banner('https://yoast.com/wordpress/plugins/video-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=video-seo-banner', 'banner-video-seo.png', 261, 152, __('Buy the Yoast Video SEO plugin now and optimize your videos for video search results and social media!', 'wordpress-seo'))); } if (class_exists('Woocommerce') && !class_exists('Yoast_WooCommerce_SEO')) { $plugin_banners->add_banner(new WPSEO_Admin_Banner('https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=woocommerce-seo-banner', 'banner-woocommerce-seo.png', 261, 152, __('Buy the Yoast WooCommerce SEO plugin now and optimize your shop today to improve your product promotion!', 'wordpress-seo'))); } if (!defined('WPSEO_LOCAL_VERSION')) { $plugin_banners->add_banner(new WPSEO_Admin_Banner('https://yoast.com/wordpress/plugins/local-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=local-seo-banner', 'banner-local-seo.png', 261, 152, __('Buy the Yoast Local SEO plugin now to improve your site’s Local SEO and ranking in Google Maps!', 'wordpress-seo'))); } if (!class_exists('WPSEO_News')) { $plugin_banners->add_banner(new WPSEO_Admin_Banner('https://yoast.com/wordpress/plugins/news-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=news-seo-banner', 'banner-news-seo.png', 261, 152, __('Buy the Yoast News SEO plugin now and start optimizing to get your site featured in Google News!', 'wordpress-seo'))); } return $plugin_banners; }
/** * Returns the remove banner spot. * * @return WPSEO_Admin_Banner_Spot */ protected function get_remove_banner_spot() { $remove_banner_spot = new WPSEO_Admin_Banner_Spot(__('Remove these ads?', 'wordpress-seo')); $remove_banner_spot->set_description('<a target="_blank" href="https://yoa.st/jy">' . sprintf(__('Upgrade to %1$s »', 'wordpress-seo'), 'Yoast SEO Premium') . '</a>'); return $remove_banner_spot; }