本文整理汇总了PHP中GoogleSitemapGenerator::GetSupportFeed方法的典型用法代码示例。如果您正苦于以下问题:PHP GoogleSitemapGenerator::GetSupportFeed方法的具体用法?PHP GoogleSitemapGenerator::GetSupportFeed怎么用?PHP GoogleSitemapGenerator::GetSupportFeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoogleSitemapGenerator
的用法示例。
在下文中一共展示了GoogleSitemapGenerator::GetSupportFeed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlShowOptionsPage
//.........这里部分代码省略.........
<div class="has-sidebar sm-padded" >
<div id="post-body-content" class="<?php
if (!$snl) {
?>
has-sidebar-content<?php
}
?>
">
<div class="meta-box-sortabless">
<!-- 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);
?>
<div style="border-left: 1px #DFDFDF solid; float:right; padding-left:15px; margin-left:10px; width:35%; min-height:150px;">
<strong><?php
_e('Recent Support Topics / News', 'sitemap');
?>
</strong>
<?php
if ($this->sg->GetOption('i_supportfeed')) {
echo "<small><a href=\"" . wp_nonce_url($this->sg->GetBackLink() . "&sm_disable_supportfeed=true") . "\">" . __('Disable', 'sitemap') . "</a></small>";
$supportFeed = $this->sg->GetSupportFeed();
if (!is_wp_error($supportFeed) && $supportFeed) {
$supportItems = $supportFeed->get_items(0, $supportFeed->get_item_quantity(3));
if (count($supportItems) > 0) {
echo "<ul>";
foreach ($supportItems as $item) {
$url = esc_url($item->get_permalink());
$title = esc_html($item->get_title());
echo "<li><a rel=\"external\" target=\"_blank\" href=\"{$url}\">{$title}</a></li>";
}
echo "</ul>";
}
} else {
echo "<ul><li>" . __('No support topics available or an error occurred while fetching them.', 'sitemap') . "</li></ul>";
}
} else {
echo "<ul><li>" . __('Support Topics have been disabled. Enable them to see useful information regarding this plugin. No Ads or Spam!', 'sitemap') . " " . "<a href=\"" . wp_nonce_url($this->sg->GetBackLink() . "&sm_disable_supportfeed=false") . "\">" . __('Enable', 'sitemap') . "</a>" . "</li></ul>";
}
?>
</div>
<div style="min-height:150px;">
<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();