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


PHP Tribe__Events__Main::getOptions方法代碼示例

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


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

示例1: migrate_from_sp_options

 protected function migrate_from_sp_options()
 {
     $tec = Tribe__Events__Main::instance();
     $tec_options = Tribe__Events__Main::getOptions();
     $option_names = array('spEventsTemplate' => 'tribeEventsTemplate', 'spEventsBeforeHTML' => 'tribeEventsBeforeHTML', 'spEventsAfterHTML' => 'tribeEventsAfterHTML');
     foreach ($option_names as $old_name => $new_name) {
         if (isset($tec_options[$old_name]) && empty($tec_options[$new_name])) {
             $tec_options[$new_name] = $tec_options[$old_name];
             unset($tec_options[$old_name]);
         }
     }
     $tec->setOptions($tec_options);
 }
開發者ID:bostondv,項目名稱:the-events-calendar,代碼行數:13,代碼來源:Updater.php

示例2: getSupportStats

 /**
  * Collect system information for support
  *
  * @return array of system data for support
  */
 public 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' => Tribe__Events__Main::getOptions(), 'WordPress timezone' => get_option('timezone_string', __('Unknown or not set', 'the-events-calendar')), 'server timezone' => date_default_timezone_get());
     if ($this->rewrite_rules_purged) {
         $systeminfo['rewrite rules purged'] = __('Rewrite rules were purged on load of this help page. Chances are there is a rewrite rule flush occurring in a plugin or theme!', 'the-events-calendar');
     }
     $systeminfo = apply_filters('tribe-events-pro-support', $systeminfo);
     return $systeminfo;
 }
開發者ID:hubbardsc,項目名稱:field_day,代碼行數:69,代碼來源:Support.php

示例3: force_save_meta

 /**
  * enforce saving on additional fields tab
  * @return void
  */
 public static function force_save_meta()
 {
     $options = Tribe__Events__Main::getOptions();
     $options = self::save_meta_options($options);
     Tribe__Events__Main::instance()->setOptions($options);
 }
開發者ID:TravisSperry,項目名稱:mpa_website,代碼行數:10,代碼來源:Custom_Meta.php


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