adminpages = apply_filters( 'wpseo_admin_pages', $this->adminpages ); if ( WPSEO_Options::grant_access() ) { add_action( 'admin_enqueue_scripts', array( $this, 'config_page_scripts' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'config_page_styles' ) ); } } /** * Generates the sidebar for admin pages. */ function admin_sidebar() { // No banners in Premium if ( class_exists( 'WPSEO_Product_Premium' ) ) { $license_manager = new Yoast_Plugin_License_Manager( new WPSEO_Product_Premium() ); if ( $license_manager->license_is_valid() ) { return; } } $service_banners = array( array( 'url' => 'https://yoast.com/hire-us/website-review/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=website-review-banner', 'img' => 'banner-website-review.png', 'alt' => 'Website Review banner', ), ); $plugin_banners = array( array( 'url' => 'https://yoast.com/wordpress/plugins/seo-premium/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=premium-seo-banner', 'img' => 'banner-premium-seo.png', 'alt' => 'Banner WordPress SEO Premium', ), ); if ( ! class_exists( 'wpseo_Video_Sitemap' ) ) { $plugin_banners[] = array( 'url' => 'https://yoast.com/wordpress/plugins/video-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=video-seo-banner', 'img' => 'banner-video-seo.png', 'alt' => 'Banner WordPress SEO Video SEO extension', ); } if ( class_exists( 'Woocommerce' ) && ! class_exists( 'Yoast_WooCommerce_SEO' ) ) { $plugin_banners[] = array( 'url' => 'https://yoast.com/wordpress/plugins/yoast-woocommerce-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=woocommerce-seo-banner', 'img' => 'banner-woocommerce-seo.png', 'alt' => 'Banner WooCommerce SEO plugin', ); } if ( ! defined( 'WPSEO_LOCAL_VERSION' ) ) { $plugin_banners[] = array( 'url' => 'https://yoast.com/wordpress/plugins/local-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=local-seo-banner', 'img' => 'banner-local-seo.png', 'alt' => 'Banner Local SEO plugin', ); } if ( ! class_exists( 'WPSEO_News' ) ) { $plugin_banners[] = array( 'url' => 'https://yoast.com/wordpress/plugins/news-seo/#utm_source=wordpress-seo-config&utm_medium=banner&utm_campaign=news-seo-banner', 'img' => 'banner-news-seo.png', 'alt' => 'Banner News SEO', ); } shuffle( $service_banners ); shuffle( $plugin_banners ); ?>