当前位置: 首页>>代码示例>>PHP>>正文


PHP GoogleSitemapGenerator::getXmlUrl方法代码示例

本文整理汇总了PHP中GoogleSitemapGenerator::getXmlUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP GoogleSitemapGenerator::getXmlUrl方法的具体用法?PHP GoogleSitemapGenerator::getXmlUrl怎么用?PHP GoogleSitemapGenerator::getXmlUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GoogleSitemapGenerator的用法示例。


在下文中一共展示了GoogleSitemapGenerator::getXmlUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: HtmlShowOptionsPage


//.........这里部分代码省略.........
					<?php 
        $this->HtmlPrintBoxHeader('sm_location', __('Location of your sitemap file', 'sitemap'));
        ?>
		
						<div>
							<b><label for="sm_location_useauto"><input type="radio" id="sm_location_useauto" name="sm_b_location_mode" value="auto" <?php 
        echo $this->sg->GetOption("b_location_mode") == "auto" ? "checked=\"checked\"" : "";
        ?>
 /> <?php 
        _e('Automatic detection', 'sitemap');
        ?>
</label></b>
							<ul>
								<li>
									<label for="sm_b_filename">
										<?php 
        _e('Filename of the sitemap file', 'sitemap');
        ?>
										<input type="text" id="sm_b_filename" name="sm_b_filename" value="<?php 
        echo $this->sg->GetOption("b_filename");
        ?>
" />
									</label><br />
									<?php 
        _e('Detected Path', 'sitemap');
        ?>
: <?php 
        echo $this->sg->getXmlPath(true);
        ?>
<br /><?php 
        _e('Detected URL', 'sitemap');
        ?>
: <a href="<?php 
        echo $this->sg->getXmlUrl(true);
        ?>
"><?php 
        echo $this->sg->getXmlUrl(true);
        ?>
</a>
								</li>
							</ul>
						</div>
						<div>
							<b><label for="sm_location_usemanual"><input type="radio" id="sm_location_usemanual" name="sm_b_location_mode" value="manual" <?php 
        echo $this->sg->GetOption("b_location_mode") == "manual" ? "checked=\"checked\"" : "";
        ?>
  /> <?php 
        _e('Custom location', 'sitemap');
        ?>
</label></b>
							<ul>
								<li>
									<label for="sm_b_filename_manual">
										<?php 
        _e('Absolute or relative path to the sitemap file, including name.', 'sitemap');
        echo "<br />";
        _e('Example', 'sitemap');
        echo ": /var/www/htdocs/wordpress/sitemap.xml";
        ?>
<br />
										<input style="width:70%" type="text" id="sm_b_filename_manual" name="sm_b_filename_manual" value="<?php 
        echo !$this->sg->GetOption("b_filename_manual") ? $this->sg->getXmlPath() : $this->sg->GetOption("b_filename_manual");
        ?>
" />
									</label>
								</li>
开发者ID:SymbiSoft,项目名称:litprojects,代码行数:67,代码来源:sitemap-ui.php

示例2: HtmlShowOptionsPage


//.........这里部分代码省略.........

							<!-- 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'));
        ?>
					
						<b><?php 
        _e('Update notification:', 'sitemap');
开发者ID:songsanren,项目名称:My-blog,代码行数:67,代码来源:sitemap-ui.php


注:本文中的GoogleSitemapGenerator::getXmlUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。