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


PHP serendipity_plugin_api::remove_plugin_value方法代碼示例

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


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

示例1: cleanup

 function cleanup()
 {
     $err = false;
     $bugp = $this->get_config('bugpath');
     $path = $this->get_config('path');
     // allow numeric client ID only
     if ($err = preg_match("/^[^0-9]+\$/", $this->get_config('client_id'))) {
         printf("%s%s%s", S9YPOT_ERR_START, S9YPOT_CID_ERROR, S9YPOT_ERR_END);
     }
     // webbug path must be absolute, no trailing slash
     if (!empty($bugp) && ($err = !preg_match("/^http(.*)[^\\/]\$/", $bugp))) {
         printf("%s%s%s", S9YPOT_ERR_START, S9YPOT_BUGURL_ERROR, S9YPOT_ERR_END);
     }
     // path must be absolute, no trailing slash
     if (!empty($path) && ($err = !preg_match("/^[\\/].*[^\\/]\$/", $path))) {
         printf("%s%s%s", S9YPOT_ERR_START, S9YPOT_PATH_ERROR, S9YPOT_ERR_END);
     }
     // check for an existing POT installation
     $location = sprintf("%s/%s", $this->get_config('path'), $this->get_config('fname'));
     if (!empty($path) && ($err = !file_exists($location))) {
         printf("%s%s%s", S9YPOT_ERR_START, S9YPOT_FNAME_ERROR, S9YPOT_ERR_END);
     }
     // s9y plugin error messaging is quite sub-optimal, print explanation what happened
     // reset all config values so nothing gets logged using a wrong client ID (logging will fail due to wrong path)
     if ($err || empty($bugp) && empty($path)) {
         $this->set_config('client_id', S9YPOT_DEFAULT_CID);
         $this->set_config('path', S9YPOT_DEFAULT_PATH);
         $this->set_config('fname', S9YPOT_DEFAULT_FNAME);
         $this->set_config('bugpath', S9YPOT_BUGDEFAULT_FNAME);
         printf("%s%s%s", S9YPOT_ERR_START, S9YPOT_ERR_RESET, S9YPOT_ERR_END);
     }
     serendipity_plugin_api::remove_plugin_value($this->instance, array('path', 'fname', 'client_id', 'bugpath'));
 }
開發者ID:sqall01,項目名稱:additional_plugins,代碼行數:33,代碼來源:serendipity_event_phpopentracker.php

示例2: cleanup

 /**
  * serendipity_plugin::cleanup method
  *
  * @return boolean
  */
 function cleanup()
 {
     global $serendipity;
     // check possible config mismatch setting
     if (serendipity_db_bool($this->get_config('showapp')) === true && serendipity_db_bool($this->get_config('automoderate')) === true) {
         $this->set_config('automoderate', false);
         echo '<div class="msg_error"><span class="icon-attention-circled"></span> ' . PLUGIN_GUESTBOOK_CONFIG_ERROR . '</div>';
         return false;
     }
     // Cleanup. Remove all empty configs on SAVECONF-Submit.
     serendipity_plugin_api::remove_plugin_value($this->instance, array('sessionlock', 'timelock', 'version', 'targetmail', 'pageurl', 'dynamic_fields', 'dynamic_fields_desc', 'formpopup', 'getdynfield', 'showdynfield'));
     return true;
 }
開發者ID:sqall01,項目名稱:additional_plugins,代碼行數:18,代碼來源:serendipity_event_guestbook.php

示例3: cleanup

 function cleanup()
 {
     // Cleanup. Remove all empty configs on SAVECONF-Submit.
     serendipity_plugin_api::remove_plugin_value($this->instance, array('title', 'description'));
     return true;
 }
開發者ID:rustyx,項目名稱:Serendipity,代碼行數:6,代碼來源:serendipity_event_contentrewrite.php


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