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


PHP GoogleSitemapGenerator::HtmlApplyPages方法代碼示例

本文整理匯總了PHP中GoogleSitemapGenerator::HtmlApplyPages方法的典型用法代碼示例。如果您正苦於以下問題:PHP GoogleSitemapGenerator::HtmlApplyPages方法的具體用法?PHP GoogleSitemapGenerator::HtmlApplyPages怎麽用?PHP GoogleSitemapGenerator::HtmlApplyPages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GoogleSitemapGenerator的用法示例。


在下文中一共展示了GoogleSitemapGenerator::HtmlApplyPages方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: HtmlShowOptionsPage


//.........這裏部分代碼省略.........
                                                $this->sg->_options[$k] = (bool) $_POST[$k];
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        //Options of the category "Includes" are boolean
                    } else {
                        if (substr($k, 0, 6) == "sm_in_") {
                            $this->sg->_options[$k] = (bool) $_POST[$k];
                            //Options of the category "Change frequencies" are string
                        } else {
                            if (substr($k, 0, 6) == "sm_cf_") {
                                $this->sg->_options[$k] = (string) $_POST[$k];
                                //Options of the category "Priorities" are float
                            } else {
                                if (substr($k, 0, 6) == "sm_pr_") {
                                    $this->sg->_options[$k] = (double) $_POST[$k];
                                }
                            }
                        }
                    }
                }
                //No Mysql unbuffered query for WP < 2.2
                if (floatval($wp_version) < 2.2) {
                    $this->sg->SetOption('b_safemode', true);
                }
                //No Wp-Cron for WP < 2.1
                if (floatval($wp_version) < 2.1) {
                    $this->sg->SetOption('b_auto_delay', false);
                }
                //Apply page changes from POST
                $this->sg->_pages = $this->sg->HtmlApplyPages();
                if ($this->sg->SaveOptions()) {
                    $message .= __('Configuration updated', 'sitemap') . "<br />";
                } else {
                    $message .= __('Error while saving options', 'sitemap') . "<br />";
                }
                if ($this->sg->SavePages()) {
                    $message .= __("Pages saved", 'sitemap') . "<br />";
                } else {
                    $message .= __('Error while saving pages', 'sitemap') . "<br />";
                }
            } else {
                if (!empty($_POST["sm_reset_config"])) {
                    //Pressed Button: Reset Config
                    check_admin_referer('sitemap');
                    $this->sg->InitOptions();
                    $this->sg->SaveOptions();
                    $message .= __('The default configuration was restored.', 'sitemap');
                }
            }
        }
        //Print out the message to the user, if any
        if ($message != "") {
            ?>
			<div class="updated"><strong><p><?php 
            echo $message;
            ?>
</p></strong></div><?php 
        }
        ?>
				
		<style type="text/css">
		
開發者ID:SymbiSoft,項目名稱:litprojects,代碼行數:66,代碼來源:sitemap-ui.php


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