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


PHP GoogleSitemapGenerator::Enable方法代碼示例

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


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

示例1: LoadPlugin

 /**
  * Loads the actual generator class and tries to raise the memory and time limits if not already done by WP
  *
  * @return boolean true if run successfully
  */
 function LoadPlugin()
 {
     $mem = abs(intval(@ini_get('memory_limit')));
     if ($mem && $mem < 32) {
         @ini_set('memory_limit', '32M');
     }
     $time = abs(intval(@ini_get("max_execution_time")));
     if ($time != 0 && $time < 120) {
         @set_time_limit(120);
     }
     if (!class_exists("GoogleSitemapGenerator")) {
         $path = trailingslashit(dirname(__FILE__));
         if (!file_exists($path . 'sitemap-core.php')) {
             return false;
         }
         require_once $path . 'sitemap-core.php';
     }
     GoogleSitemapGenerator::Enable();
     return true;
 }
開發者ID:sjcockell,項目名稱:fuzzierlogic.blog,代碼行數:25,代碼來源:sitemap.php

示例2: header

						</table>
					</p>
				</fieldset>
			</form>
		</div>
		<script type="text/javascript">
		sm_addLinks();
		sm_gencode();
		</script>
		<?php 
    }
}
//Check if ABSPATH and WPINC is defined, this is done in wp-settings.php
//If not defined, we can't guarante that all required functions are available.
if (defined("ABSPATH") && defined("WPINC")) {
    GoogleSitemapGenerator::Enable();
}
//Embedded resources
if (isset($_GET["res"]) && !empty($_GET["res"])) {
    #region Images
    //Paypal
    if ($_GET["res"] == "{8C0BAD8C-77FA-4842-956E-CDEF7635F2C7}") {
        header("Content-Type: image/gif");
        echo base64_decode("R0lGODlhEAAQAMQQANbe5sjT3gAzZpGmvOTp7v///629zYSctK28zbvI1ZKnvfH094SbtHaQrHaRrJ+xxf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAHoAxAALAAAAAAQABAAQAVZICSOZDkGQqGuBTqUSMqqiTACwqIKgGkKwCDwVRIodkDVwjYSMFSNoCNQIgSugZ6vBMBetSYCj0UwCA6lgyy4YoqWASRAZSYNZNaA+VxM7B5bEA9CboGGIyEAOw==");
        exit;
    }
    //Amazon
    if ($_GET["res"] == "{9866EAFC-3F85-44df-8A72-4CD1566E2D4F}") {
        header("Content-Type: image/gif");
        echo base64_decode("R0lGODlhEAAQAMQGADc1NVBOTmloaERCQl1bW9rZ2f///7Szs8rKyubm5nZ0dJuamvPy8qinp31gOLeDOuWgPPGnPM6SO05DNoKBgY+NjXFZN8OLOpRuOWZSN0M8NdqZO1pKNqB1OYhnOOrBhSwAAAAAEAAQAEAFeSAgBsIgnqiYGOxaAM4DRZE0AcOCMOyS/hxLR0KLPCaciEOEMCQKLMVPRIgCetPsaYLRXCKaIm3TuZ08mhMByjpoAQhE4GrwZaGMBnYq6OkNL1kBCwsUABUDFhcXGDIRGVMTDl8QExsSABcbYjQXkABDIh8XHQ5mWiEAOw==");
        exit;
開發者ID:jbogota,項目名稱:blog-king,代碼行數:31,代碼來源:sitemap.php


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