本文整理汇总了PHP中GoogleSitemapGenerator::GetCustomTaxonomies方法的典型用法代码示例。如果您正苦于以下问题:PHP GoogleSitemapGenerator::GetCustomTaxonomies方法的具体用法?PHP GoogleSitemapGenerator::GetCustomTaxonomies怎么用?PHP GoogleSitemapGenerator::GetCustomTaxonomies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoogleSitemapGenerator
的用法示例。
在下文中一共展示了GoogleSitemapGenerator::GetCustomTaxonomies方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlShowOptionsPage
//.........这里部分代码省略.........
</li>
<li>
<label for="sm_in_auth">
<input type="checkbox" id="sm_in_auth" name="sm_in_auth" <?php
echo $this->sg->GetOption("in_auth") == true ? "checked=\"checked\"" : "";
?>
/>
<?php
_e('Include author pages', 'sitemap');
?>
</label>
</li>
<?php
if ($this->sg->IsTaxonomySupported()) {
?>
<li>
<label for="sm_in_tags">
<input type="checkbox" id="sm_in_tags" name="sm_in_tags" <?php
echo $this->sg->GetOption("in_tags") == true ? "checked=\"checked\"" : "";
?>
/>
<?php
_e('Include tag pages', 'sitemap');
?>
</label>
</li>
<?php
}
?>
</ul>
<?php
if ($this->sg->IsTaxonomySupported()) {
$taxonomies = $this->sg->GetCustomTaxonomies();
$enabledTaxonomies = $this->sg->GetOption('in_tax');
if (count($taxonomies) > 0) {
?>
<b><?php
_e('Custom taxonomies', 'sitemap');
?>
:</b><ul><?php
foreach ($taxonomies as $taxName) {
$taxonomy = get_taxonomy($taxName);
$selected = in_array($taxonomy->name, $enabledTaxonomies);
?>
<li>
<label for="sm_in_tax[<?php
echo $taxonomy->name;
?>
]">
<input type="checkbox" id="sm_in_tax[<?php
echo $taxonomy->name;
?>
]" name="sm_in_tax[<?php
echo $taxonomy->name;
?>
]" <?php
echo $selected ? "checked=\"checked\"" : "";
?>
/>
<?php
echo str_replace('%s', $taxonomy->label, __('Include taxonomy pages for %s', 'sitemap'));
?>
</label>
</li>
<?php
示例2: HtmlShowOptionsPage
//.........这里部分代码省略.........
?>
/>
<?php
_e('Include categories', 'sitemap');
?>
</label>
</li>
<li>
<label for="sm_in_arch">
<input type="checkbox" id="sm_in_arch" name="sm_in_arch" <?php
echo $this->sg->GetOption("in_arch") == true ? "checked=\"checked\"" : "";
?>
/>
<?php
_e('Include archives', 'sitemap');
?>
</label>
</li>
<?php
if ($this->sg->IsTaxonomySupported()) {
?>
<li>
<label for="sm_in_tags">
<input type="checkbox" id="sm_in_tags" name="sm_in_tags" <?php
echo $this->sg->GetOption("in_tags") == true ? "checked=\"checked\"" : "";
?>
/>
<?php
_e('Include tag pages', 'sitemap');
?>
</label>
</li>
<?php
$taxonomies = $this->sg->GetCustomTaxonomies();
$enabledTaxonomies = $this->sg->GetOption('in_tax');
foreach ($taxonomies as $taxName) {
$taxonomy = get_taxonomy($taxName);
$selected = in_array($taxonomy->name, $enabledTaxonomies);
?>
<li>
<label for="sm_in_tax[<?php
echo $taxonomy->name;
?>
]">
<input type="checkbox" id="sm_in_tax[<?php
echo $taxonomy->name;
?>
]" name="sm_in_tax[<?php
echo $taxonomy->name;
?>
]" <?php
echo $selected ? "checked=\"checked\"" : "";
?>
/>
<?php
echo str_replace('%s', $taxonomy->label, __('Include taxonomy pages for %s', 'sitemap'));
?>
</label>
<li>
<?php
}
?>
<?php
}
?>
<li>