当前位置: 首页>>代码示例>>PHP>>正文


PHP TribeEvents::getOptions方法代码示例

本文整理汇总了PHP中TribeEvents::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP TribeEvents::getOptions方法的具体用法?PHP TribeEvents::getOptions怎么用?PHP TribeEvents::getOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TribeEvents的用法示例。


在下文中一共展示了TribeEvents::getOptions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSupportStats

 /**
  * Collect system information for support
  *
  * @return array of system data for support
  * @author Peter Chester
  */
 public static function getSupportStats()
 {
     $user = wp_get_current_user();
     $plugins = array();
     if (function_exists('get_plugin_data')) {
         $plugins_raw = wp_get_active_and_valid_plugins();
         foreach ($plugins_raw as $k => $v) {
             $plugin_details = get_plugin_data($v);
             $plugin = $plugin_details['Name'];
             if (!empty($plugin_details['Version'])) {
                 $plugin .= sprintf(' version %s', $plugin_details['Version']);
             }
             if (!empty($plugin_details['Author'])) {
                 $plugin .= sprintf(' by %s', $plugin_details['Author']);
             }
             if (!empty($plugin_details['AuthorURI'])) {
                 $plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
             }
             $plugins[] = $plugin;
         }
     }
     $network_plugins = array();
     if (is_multisite() && function_exists('get_plugin_data')) {
         $plugins_raw = wp_get_active_network_plugins();
         foreach ($plugins_raw as $k => $v) {
             $plugin_details = get_plugin_data($v);
             $plugin = $plugin_details['Name'];
             if (!empty($plugin_details['Version'])) {
                 $plugin .= sprintf(' version %s', $plugin_details['Version']);
             }
             if (!empty($plugin_details['Author'])) {
                 $plugin .= sprintf(' by %s', $plugin_details['Author']);
             }
             if (!empty($plugin_details['AuthorURI'])) {
                 $plugin .= sprintf('(%s)', $plugin_details['AuthorURI']);
             }
             $network_plugins[] = $plugin;
         }
     }
     $mu_plugins = array();
     if (function_exists('get_mu_plugins')) {
         $mu_plugins_raw = get_mu_plugins();
         foreach ($mu_plugins_raw as $k => $v) {
             $plugin = $v['Name'];
             if (!empty($v['Version'])) {
                 $plugin .= sprintf(' version %s', $v['Version']);
             }
             if (!empty($v['Author'])) {
                 $plugin .= sprintf(' by %s', $v['Author']);
             }
             if (!empty($v['AuthorURI'])) {
                 $plugin .= sprintf('(%s)', $v['AuthorURI']);
             }
             $mu_plugins[] = $plugin;
         }
     }
     $keys = apply_filters('tribe-pue-install-keys', array());
     $systeminfo = array('url' => 'http://' . $_SERVER["HTTP_HOST"], 'name' => $user->display_name, 'email' => $user->user_email, 'install keys' => $keys, 'WordPress version' => get_bloginfo('version'), 'PHP version' => phpversion(), 'plugins' => $plugins, 'network plugins' => $network_plugins, 'mu plugins' => $mu_plugins, 'theme' => wp_get_theme()->get('Name'), 'multisite' => is_multisite(), 'settings' => TribeEvents::getOptions());
     $systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
     return $systeminfo;
 }
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:67,代码来源:tribe-support.class.php

示例2: force_save_meta

 /**
  * enforce saving on additional fields tab
  * @author jkudish
  * @since 2.0.5
  * @return void
  */
 public function force_save_meta()
 {
     $options = TribeEvents::getOptions();
     $options = self::save_meta_options($options);
     $options = TribeEvents::setOptions($options);
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:12,代码来源:tribe-ecp-custom-meta.class.php

示例3: setOptions

 /**
  * Saves the options for the plugin
  *
  * @param array $options formatted the same as from getOptions()
  * @return void
  */
 public function setOptions($options, $apply_filters = true)
 {
     if (!is_array($options)) {
         return;
     }
     if ($apply_filters == true) {
         $options = apply_filters('tribe-events-save-options', $options);
     }
     if (update_option(TribeEvents::OPTIONNAME, $options)) {
         self::$options = apply_filters('tribe_get_options', $options);
         if (isset(TribeEvents::$options['eventsSlug'])) {
             if (TribeEvents::$options['eventsSlug'] != '') {
                 TribeEvents::flushRewriteRules();
             }
         }
         return true;
     } else {
         TribeEvents::$options = TribeEvents::getOptions();
         return false;
     }
 }
开发者ID:kevinreilly,项目名称:redwood-city-chamber-wp,代码行数:27,代码来源:the-events-calendar.class.php

示例4: setOptions

 /**
  * Saves the options for the plugin
  *
  * @param array $options formatted the same as from getOptions()
  * @param bool  $apply_filters
  *
  * @return void
  */
 public function setOptions($options, $apply_filters = true)
 {
     if (!is_array($options)) {
         return;
     }
     if ($apply_filters == true) {
         $options = apply_filters('tribe-events-save-options', $options);
     }
     // @TODO use TribeEvents::getOptions
     if (update_option(TribeEvents::OPTIONNAME, $options)) {
         self::$options = apply_filters('tribe_get_options', $options);
         return true;
     } else {
         TribeEvents::$options = TribeEvents::getOptions();
         return false;
     }
 }
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:25,代码来源:the-events-calendar.class.php

示例5: generateSupportHash

 /**
  * Generate a hash with all the system support information
  *
  * @return string of encoded support info
  * @author Peter Chester
  */
 public static function generateSupportHash()
 {
     $user = wp_get_current_user();
     $plugins_raw = wp_get_active_and_valid_plugins();
     $plugins = array();
     foreach ($plugins_raw as $k => $v) {
         $plugins[] = basename($v);
     }
     $systeminfo = array('URL' => 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI'], 'NAME' => $user->display_name, 'EMAIL' => $user->user_email, 'PLUGIN VERSION' => TribeEvents::VERSION, 'WORDPRESS VERSION' => get_bloginfo('version'), 'PHP VERSION' => phpversion(), 'PLUGINS' => $plugins, 'THEME' => get_current_theme(), 'MU INSTALL' => is_multisite() ? 'TRUE' : 'FALSE', 'SETTINGS' => TribeEvents::getOptions(), 'ERRORS' => self::$debug_log);
     $systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
     $systeminfo = serialize($systeminfo);
     $systeminfo = base64_encode($systeminfo);
     return $systeminfo;
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:20,代码来源:tribe-support.class.php

示例6: force_save_meta

 /**
  * enforce saving on additional fields tab
  * @author jkudish
  * @since 2.0.5
  * @return void
  */
 public static function force_save_meta()
 {
     $options = TribeEvents::getOptions();
     $options = self::save_meta_options($options);
     TribeEvents::instance()->setOptions($options);
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:12,代码来源:tribe-ecp-custom-meta.class.php


注:本文中的TribeEvents::getOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。