/** * Display admin page */ public function display() { // Load options $options = WPSEO_News::get_options(); // Admin header WPSEO_News_Wrappers::admin_header(true, 'yoast_wpseo_news_options', 'wpseo_news'); // Introducten echo '<p>' . __('You will generally only need XML News sitemap when your website is included in Google News.', 'wordpress-seo-news') . '</p>'; echo '<p>' . sprintf(__('You can find your news sitemap here: %1$sXML News sitemap%2$s', 'wordpress-seo-news'), "<a target='_blank' class='button-secondary' href='" . WPSEO_News::get_sitemap_name() . "'>", '</a>') . '</p>'; // Google News Publication Name echo WPSEO_News_Wrappers::textinput('name', __('Google News Publication Name', 'wordpress-seo-news')); // Default Genre echo WPSEO_News_Wrappers::select('default_genre', __('Default Genre', 'wordpress-seo-news'), WPSEO_News::list_genres()); // Default keywords $this->default_keywords(); // Post Types to include in News Sitemap $this->include_post_types(); // Post categories to exclude $this->excluded_post_categories(); // Editors' Pick $this->editors_pick(); // Admin footer WPSEO_News_Wrappers::admin_footer(true, false); }
/** * Register the XML News sitemap with the main sitemap class. */ public function init() { if (isset($GLOBALS['wpseo_sitemaps'])) { $GLOBALS['wpseo_sitemaps']->register_sitemap(WPSEO_News::get_sitemap_name(false), array($this, 'build')); } }