當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GoogleSitemapGenerator::OldFileExists方法代碼示例

本文整理匯總了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'));
        ?>
開發者ID:songsanren,項目名稱:My-blog,代碼行數:67,代碼來源:sitemap-ui.php


注:本文中的GoogleSitemapGenerator::OldFileExists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。