本文整理汇总了PHP中GoogleSitemapGenerator::getDefaultStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP GoogleSitemapGenerator::getDefaultStyle方法的具体用法?PHP GoogleSitemapGenerator::getDefaultStyle怎么用?PHP GoogleSitemapGenerator::getDefaultStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoogleSitemapGenerator
的用法示例。
在下文中一共展示了GoogleSitemapGenerator::getDefaultStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlShowOptionsPage
//.........这里部分代码省略.........
$total = 0;
foreach ($GLOBALS['wpdb']->queries as $q) {
$total += $q[1];
}
echo '<h4>Total Query Time</h4>';
echo '<pre>' . count($GLOBALS['wpdb']->queries) . ' queries in ' . round($total, 2) . ' seconds.</pre>';
} else {
echo '<p>Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.</p>';
}
echo "<h3>Build Process Results</h3>";
echo "<pre>";
print_r($status);
echo "</pre>";
echo '<p>Done. <a href="' . wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true", 'sitemap') . '">Rebuild</a> or <a href="' . $this->sg->GetBackLink() . '">Return</a></p>';
echo '<p style="font-weight:bold; color:red; padding:5px; border:1px red solid; text-align:center;">DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!</p>';
echo '</div>';
@error_reporting($oldErr);
@ini_set("display_errors", $oldIni);
return;
} else {
$this->sg->BuildSitemap();
$redirURL = $this->sg->GetBackLink() . '&sm_fromrb=true';
//Redirect so the sm_rebuild GET parameter no longer exists.
@header("location: " . $redirURL);
//If there was already any other output, the header redirect will fail
echo '<script type="text/javascript">location.replace("' . $redirUrl . '");</script>';
echo '<noscript><a href="' . $redirURL . '">Click here to continue</a></noscript>';
exit;
}
} else {
if (!empty($_POST['sm_update'])) {
//Pressed Button: Update Config
check_admin_referer('sitemap');
if (isset($_POST['sm_b_style']) && $_POST['sm_b_style'] == $this->sg->getDefaultStyle()) {
$_POST['sm_b_style_default'] = true;
$_POST['sm_b_style'] = '';
}
foreach ($this->sg->_options as $k => $v) {
//Check vor values and convert them into their types, based on the category they are in
if (!isset($_POST[$k])) {
$_POST[$k] = "";
}
// Empty string will get false on 2bool and 0 on 2float
//Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider
if (substr($k, 0, 5) == "sm_b_") {
if ($k == "sm_b_filename" || $k == "sm_b_fileurl_manual" || $k == "sm_b_filename_manual" || $k == "sm_b_prio_provider" || $k == "sm_b_manual_key" || $k == "sm_b_yahookey" || $k == "sm_b_style" || $k == "sm_b_memory") {
if ($k == "sm_b_filename_manual" && strpos($_POST[$k], "\\") !== false) {
$_POST[$k] = stripslashes($_POST[$k]);
}
$this->sg->_options[$k] = (string) $_POST[$k];
} else {
if ($k == "sm_b_location_mode") {
$tmp = (string) $_POST[$k];
$tmp = strtolower($tmp);
if ($tmp == "auto" || ($tmp = "manual")) {
$this->sg->_options[$k] = $tmp;
} else {
$this->sg->_options[$k] = "auto";
}
} else {
if ($k == "sm_b_time" || $k == "sm_b_max_posts") {
if ($_POST[$k] == '') {
$_POST[$k] = -1;
}
$this->sg->_options[$k] = intval($_POST[$k]);
} else {
示例2: HtmlShowOptionsPage
//.........这里部分代码省略.........
echo '</pre>';
$total = 0;
foreach ($GLOBALS['wpdb']->queries as $q) {
$total += $q[1];
}
echo '<h4>Total Query Time</h4>';
echo '<pre>' . count($GLOBALS['wpdb']->queries) . ' queries in ' . round($total, 2) . ' seconds.</pre>';
} else {
echo '<p>Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.</p>';
}
echo "<h3>Build Process Results</h3>";
echo "<pre>";
print_r($status);
echo "</pre>";
echo '<p>Done. <a href="' . wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true", 'sitemap') . '">Rebuild</a> or <a href="' . $this->sg->GetBackLink() . '">Return</a></p>';
echo '<p style="font-weight:bold; color:red; padding:5px; border:1px red solid; text-align:center;">DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!</p>';
echo '</div>';
@error_reporting($oldErr);
@ini_set("display_errors", $oldIni);
return;
} else {
$redirURL = $this->sg->GetBackLink() . '&sm_fromrb=true';
//Redirect so the sm_rebuild GET parameter no longer exists.
@header("location: " . $redirURL);
//If there was already any other output, the header redirect will fail
echo '<script type="text/javascript">location.replace("' . $redirURL . '");</script>';
echo '<noscript><a href="' . $redirURL . '">Click here to continue</a></noscript>';
exit;
}
} else {
if (!empty($_POST['sm_update'])) {
//Pressed Button: Update Config
check_admin_referer('sitemap');
if (isset($_POST['sm_b_style']) && $_POST['sm_b_style'] == $this->sg->getDefaultStyle()) {
$_POST['sm_b_style_default'] = true;
$_POST['sm_b_style'] = '';
}
foreach ($this->sg->GetOptions() as $k => $v) {
//Check vor values and convert them into their types, based on the category they are in
if (!isset($_POST[$k])) {
$_POST[$k] = "";
}
// Empty string will get false on 2bool and 0 on 2float
//Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider
if (substr($k, 0, 5) == "sm_b_") {
if ($k == "sm_b_prio_provider" || $k == "sm_b_yahookey" || $k == "sm_b_style" || $k == "sm_b_memory") {
if ($k == "sm_b_filename_manual" && strpos($_POST[$k], "\\") !== false) {
$_POST[$k] = stripslashes($_POST[$k]);
}
$this->sg->SetOption($k, (string) $_POST[$k]);
} else {
if ($k == "sm_b_time") {
if ($_POST[$k] == '') {
$_POST[$k] = -1;
}
$this->sg->SetOption($k, intval($_POST[$k]));
} else {
if ($k == "sm_i_install_date") {
if ($this->sg->GetOption('i_install_date') <= 0) {
$this->sg->SetOption($k, time());
}
} else {
if ($k == "sm_b_exclude") {
$IDss = array();
$IDs = explode(",", $_POST[$k]);
for ($x = 0; $x < count($IDs); $x++) {