当前位置: 首页>>代码示例>>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;未经允许,请勿转载。