本文整理汇总了PHP中GoogleSitemapGenerator::OldFileExists方法的典型用法代码示例。如果您正苦于以下问题:PHP GoogleSitemapGenerator::OldFileExists方法的具体用法?PHP GoogleSitemapGenerator::OldFileExists怎么用?PHP GoogleSitemapGenerator::OldFileExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoogleSitemapGenerator
的用法示例。
在下文中一共展示了GoogleSitemapGenerator::OldFileExists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlShowOptionsPage
//.........这里部分代码省略.........
">
<div class="meta-box-sortabless">
<!-- beta note -->
<?php
$this->HtmlPrintBoxHeader('sm_rebuild', __('Beta-version', 'sitemap'));
?>
<p><strong><?php
_e('Thanks for trying out the latest beta release of the sitemap generator plugin!', 'sitemap');
?>
</strong></p>
<p><?php
printf(__('Please let me know if you experience any problems or if you have any suggestions by posting <a href="%s">here</a>. Your feedback is very important for me!', 'sitemap'), $this->sg->GetRedirectLink('sitemap-beta-feedback'));
?>
</p>
<?php
$this->HtmlPrintBoxFooter();
?>
<!-- Rebuild Area -->
<?php
$status = GoogleSitemapGeneratorStatus::Load();
$head = __('Search engines haven\'t been notified yet', 'sitemap');
if ($status != null && $status->GetStartTime() > 0) {
$st = $status->GetStartTime() + get_option('gmt_offset') * 3600;
$head = str_replace("%date%", date_i18n(get_option('date_format'), $st) . " " . date_i18n(get_option('time_format'), $st), __("Result of the last ping, started on %date%.", 'sitemap'));
}
$this->HtmlPrintBoxHeader('sm_rebuild', $head);
?>
<ul>
<?php
if ($this->sg->OldFileExists()) {
echo "<li class=\"sm_error\">" . str_replace("%s", wp_nonce_url($this->sg->GetBackLink() . "&sm_delete_old=true", 'sitemap'), __('There is still a sitemap.xml or sitemap.xml.gz file in your blog directory. Please delete them as no static files are used anymore or <a href="%s">try to delete them automatically</a>.', 'sitemap')) . "</li>";
}
echo "<li>" . str_replace("%s", $this->sg->getXmlUrl(), __('The URL to your sitemap index file is: <a href="%s">%s</a>.', 'sitemap')) . "</li>";
if ($status == null) {
echo "<li>" . __('Search engines haven\'t been notified yet. Write a post to let them know about your sitemap.', 'sitemap') . "</li>";
} else {
$services = $status->GetUsedPingServices();
foreach ($services as $service) {
$name = $status->GetServiceName($service);
if ($status->GetPingResult($service)) {
echo "<li>" . sprintf(__("%s was <b>successfully notified</b> about changes.", 'sitemap'), $name) . "</li>";
$dur = $status->GetPingDuration($service);
if ($dur > 4) {
echo "<li class=\\sm_optimize\">" . str_replace(array("%time%", "%name%"), array($dur, $name), __("It took %time% seconds to notify %name%, maybe you want to disable this feature to reduce the building time.", 'sitemap')) . "</li>";
}
} else {
echo "<li class=\"sm_error\">" . str_replace(array("%s", "%name%"), array(wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=" . $service . "&noheader=true", 'sitemap'), $name), __('There was a problem while notifying %name%. <a href="%s">View result</a>', 'sitemap')) . "</li>";
}
}
}
echo "<li>" . str_replace("%d", wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true", 'sitemap'), __('If you encounter any problems with your sitemap you can use the <a href="%d">debug function</a> to get more information.', 'sitemap')) . "</li>";
?>
</ul>
<?php
$this->HtmlPrintBoxFooter();
?>
<!-- Basic Options -->
<?php
$this->HtmlPrintBoxHeader('sm_basic_options', __('Basic Options', 'sitemap'));
?>