static function render($post) { $settings = dataAccess::getMetaItem($post->ID, "post"); wp_nonce_field(basename(__FILE__), 'wpXSG_meta_nonce'); ?> <p><strong>Sitemap inclusion</strong></p> <select name="wpXSG-Exclude" id="wpXSG-Exclude" ></select> <label for="wpXSG-Exclude"></label> <p><strong>Relative priority</strong></p> <select name="wpXSG-Priority" id="wpXSG-Priority" ></select> <p><strong>Update frequency</strong></p> <select name="wpXSG-Frequency" id="wpXSG-Frequency" ></select> <script type="text/javascript" src="<?php echo myPluginPath(); ?> scripts.js"></script> <script> populate("wpXSG-Exclude" ,excludeSelect, <?php echo $settings->exclude; ?> ); populate("wpXSG-Priority" ,prioritySelect, <?php echo $settings->priority; ?> ); populate("wpXSG-Frequency" ,frequencySelect, <?php echo $settings->frequency; ?> ); </script> <?php }
static function renderEdit($tag) { $term_id = $tag->term_id; self::addHooks(); $settings = dataAccess::getMetaItem($term_id, "taxonomy"); wp_nonce_field(basename(__FILE__), 'wpXSG_meta_nonce'); ?> <h3>Sitemap settings : </h3> <table class="form-table"> <tbody><tr class="form-field form-required term-name-wrap"> <th scope="row"><label for="name">Sitemap inclusion</label></th> <td> <select name="wpXSG-Exclude" id="wpXSG-Exclude" ></select> <p> Exclude this category/tag from your sitemap.</p> </td> </tr> <tr class="form-field term-slug-wrap"> <th scope="row"><label for="slug">Relative priority</label></th> <td> <select name="wpXSG-Priority" id="wpXSG-Priority" ></select> <p>Relative priority for this category/tag and related posts.</p> </td> </tr> <tr class="form-field term-description-wrap"> <th scope="row"><label for="description">Update frequency</label></th> <td> <select name="wpXSG-Frequency" id="wpXSG-Frequency" ></select> <p>Sitemap update frequency for this category/tag.</p> </td> </tr> <tr class="form-field term-description-wrap"> <th scope="row"><label for="description">Post inheritance</label></th> <td> <select name="wpXSG-Inherit" id="wpXSG-Inherit" ></select> <p>Immediate child posts/pages inherit these settings.</p> </td> </tr> </tbody></table> <script type="text/javascript" src="<?php echo myPluginPath(); ?> scripts.js"></script> <script> populate("wpXSG-Exclude" ,excludeSelect, <?php echo $settings->exclude; ?> ); populate("wpXSG-Priority" ,prioritySelect, <?php echo $settings->priority; ?> ); populate("wpXSG-Frequency" ,frequencySelect, <?php echo $settings->frequency; ?> ); populate("wpXSG-Inherit" ,inheritSelect, <?php echo $settings->inherit; ?> ); </script> <?php }
public static function render() { self::handlePostBack(); $globalSettings = get_option("wpXSG_global", new globalSettings()); $sitemapDefaults = get_option("wpXSG_sitemapDefaults", new sitemapDefaults()); core::updateStatistics("Admin", "ViewSettings", 0); ?> <form method="post" > <?php wp_nonce_field(basename(__FILE__), 'wpXSG_meta_nonce'); ?> <div class="wrap" > <h2>Google XML Sitemap Generator</h2> <p>Here you can edit your admin settings and defaults.</p> <p>You can override categories, tags, pages and posts when adding and editing them.</p> <a target="_blank" href="https://xmlsitemapgenerator.org/contact.aspx">contact us</a> with any comments, questions, suggestions and bugs.</strong></p> <div id="poststuff" class="metabox-holder has-right-sidebar"> <div class="inner-sidebar"> <div class="meta-box-sortabless ui-sortable" style="position:relative;"> <div class="postbox"> <h3 class="hndle"><span>Sitemap related urls</span></h3> <div class="inside"> <p>Pages that are created or modified by Xml Sitemap Generator</p> <ul> <?php $url = get_bloginfo('url'); echo '<li><a target="_blank" href="' . $url . '/xmlsitemap.xml">XML Sitemap</a></li>'; echo '<li><a target="_blank" href="' . $url . '/rsssitemap.xml">RSS Sitemap</a></li>'; echo '<li><a target="_blank" href="' . $url . '/rsslatest.xml">New Pages RSS</a></li>'; echo '<li><a target="_blank" href="' . $url . '/robots.txt">Robots.txt</a></li>'; ?> </ul> </div> </div> <div class="postbox"> <h3 class="hndle"><span>Webmaster tools</span></h3> <div class="inside"> <p>It is highly recommended you register your sitemap with webmaster tools to obtain performance insights.</p> <ul> <li><a href="https://www.google.com/webmasters/tools/">Google Webmaster tools</a></li> <li><a href="http://www.bing.com/toolbox/webmaster">Bing Webmaster tools</a></li> <li><a href="http://zhanzhang.baidu.com/">Baidu Webmaster tools</a></li> <li><a href="https://webmaster.yandex.com/">Yandex Webmaster tools</a></li> </ul> </div> </div> <div class="postbox"> <h3 class="hndle"><span>Useful links</span></h3> <div class="inside"> <ul> <li><a href="https://xmlsitemapgenerator.org/Wordpress-sitemap-plugin.aspx">Help and support</a></li> <li><a href="http://blog.xmlsitemapgenerator.org/">blog.XmlSitemapGenerator.org</a></li> <li><a href="https://twitter.com/createsitemaps">twitter : @CreateSitemaps</a></li> <li><a href="https://www.facebook.com/XmlSitemapGenerator">facebook XmlSitemapGenerator</a></li> </ul> </div> </div> <div class="postbox"> <h3 class="hndle"><span>Please support us</span></h3> <div class="inside"> <p>We take time out of our personal lives to develop and support our sitemap tools and cover costs out of our own pockets. </p> <p>Please help with costs by making a small contribution..</p> <p><a target="_blank" href="https://xmlsitemapgenerator.org/donate.aspx">Make a small donation</a></p> </div> </div> </div> </div> <div class="has-sidebar"> <div id="post-body-content" class="has-sidebar-content"> <div class="meta-box-sortabless"> <script type="text/javascript" src="<?php echo myPluginPath(); ?> scripts.js"></script> <div class="postbox"> <h3 class="hndle"><span>General settings</span></h3> <div class="inside"> <p>General options for your sitemap. We recommend you enable all of these.</p> <ul> <li> <input type="checkbox" name="pingSitemap" id="pingSitemap" value="1" <?php checked($globalSettings->pingSitemap, '1'); ?> /> <label for="sm_b_ping">Automatically ping Google / Bing (MSN & Yahoo) daily</label><br> </li> <li> <input type="checkbox" name="addRssToHead" id=""addRssToHead" value="1" <?php checked($globalSettings->addRssToHead, '1'); ?> /> <label for="sm_b_ping">Add latest pages / post RSS feed to head tag</label><br> </li> <li> <input type="checkbox" name="addToRobots" id="addToRobots" value="1" <?php checked($globalSettings->addToRobots, '1'); ?> /> <label for="sm_b_ping">Add sitemap links to your robots.txt file</label><br> </li> <li> <input type="checkbox" name="sendStats" id="sendStats" value="1" <?php checked($globalSettings->sendStats, '1'); ?> /> <label for="sm_b_ping">Help us improve by allowing basic usage stats (Page count, PHP Version, feature usage, etc.)</label><br> </li> <li> <input type="checkbox" name="smallCredit" id="smallCredit" value="1" <?php checked($globalSettings->smallCredit, '1'); ?> /> <label for="sm_b_ping">Support us by allowing a small credit in the sitemap file footer (Does not appear on your website)</label><br> </li> </ul> </div> </div> <div class="postbox"> <h3 class="hndle"><span>Sitemap defaults</span></h3> <div class="inside"> <p>Set the defaults for your sitemap here.</p> <ul> <li> <select name="dateField" id="dateField"> <option <?php if ($sitemapDefaults->dateField == "created") { echo 'selected="selected"'; } ?> >created</option> <option <?php if ($sitemapDefaults->dateField == "updated") { echo 'selected="selected"'; } ?> >updated</option> </select> <label for="sm_b_ping"> date field to use for modified date / recently updated.</label><br> </li> </ul> <p>You can override the sitemap default settings for taxonomy items (categories, tags, etc), pages and posts when adding and editing them.</p> <table class="wp-list-table widefat fixed striped tags" style="clear:none;"> <thead> <tr> <th scope="col">Page / area</th> <th scope="col">Exclude</th> <th scope="col">Relative priority</th> <th scope="col">Update frequency</th> </tr> </thead> <tbody id="the-list" > <?php self::RenderDefaultSection("Home page", "homepage", $sitemapDefaults->homepage); self::RenderDefaultSection("Regular page", "pages", $sitemapDefaults->pages); self::RenderDefaultSection("Post page", "posts", $sitemapDefaults->posts); self::RenderDefaultSection("Taxonomy - categories", "taxonomyCategories", $sitemapDefaults->taxonomyCategories); self::RenderDefaultSection("Taxonomy - tags", "taxonomyTags", $sitemapDefaults->taxonomyTags); self::RenderDefaultSection("Archive - recent", "recentArchive", $sitemapDefaults->recentArchive); self::RenderDefaultSection("Archive - old", "oldArchive", $sitemapDefaults->oldArchive); self::RenderDefaultSection("Authors", "authors", $sitemapDefaults->authors); ?> </tbody></table> </div> </div> <div class="postbox"> <h3 class="hndle"><span>Log</span></h3> <div class="inside"> <?php echo core::getStatusHtml(); ?> </div> </div> </div> </div> <?php submit_button(); ?> </div> </div> </div> </form> <?php }