/** * displays the content for the tab * * @since 2.0.5 * @author jkudish * @return void */ public function doContent() { if ($this->display_callback && function_exists($this->display_callback)) { call_user_func($this->display_callback); return; } $sent_data = get_option('tribe_settings_sent_data', array()); if (is_array($this->fields) && !empty($this->fields)) { foreach ($this->fields as $key => $field) { if (isset($sent_data[$key])) { // if we just saved [or attempted to], get the value that was inputed $value = $sent_data[$key]; } else { if (is_network_admin()) { $parent_option = isset($field['parent_option']) ? $field['parent_option'] : TribeEvents::OPTIONNAMENETWORK; } if (!is_network_admin()) { $parent_option = isset($field['parent_option']) ? $field['parent_option'] : TribeEvents::OPTIONNAME; } // get the field's parent_option in order to later get the field's value $parent_option = apply_filters('tribe_settings_do_content_parent_option', $parent_option, $key); $default = isset($field['default']) ? $field['default'] : null; $default = apply_filters('tribe_settings_field_default', $default, $field); if (!$parent_option) { // no parent option, get the straight up value if (is_network_admin()) { $value = get_site_option($key, $default); } else { $value = get_option($key, $default); } } else { // there's a parent option if ($parent_option == TribeEvents::OPTIONNAME) { // get the options from TribeEvents if we're getting the main array $value = TribeEvents::getOption($key, $default); } elseif ($parent_option == TribeEvents::OPTIONNAMENETWORK) { $value = TribeEvents::getNetworkOption($key, $default); } else { // else, get the parent option normally if (is_network_admin()) { $options = (array) get_site_option($parent_option); } else { $options = (array) get_option($parent_option); } $value = isset($options[$key]) ? $options[$key] : $default; } } } // escape the value for display if (!empty($field['esc_display']) && function_exists($field['esc_display'])) { $value = $field['esc_display']($value); } elseif (is_string($value)) { $value = esc_attr(stripslashes($value)); } // filter the value $value = apply_filters('tribe_settings_get_option_value_pre_display', $value, $key, $field); // create the field new TribeField($key, $field, $value); } } else { // no fields setup for this tab yet echo '<p>' . __('There are no fields setup for this tab yet.', 'tribe-events-calendar') . '</p>'; } }
} ?> <th class="essential"><?php _e('Start Date', 'tribe-events-community'); ?> </th> <th class="essential"><?php _e('End Date', 'tribe-events-community'); ?> </th> </tr> </thead><!-- #my-events-display-headers --> <tbody id="the-list"><tr> <?php $rewriteSlugSingular = TribeEvents::getOption('singleEventSlug', 'event'); global $post; $old_post = $post; while ($events->have_posts()) { $e = $events->next_post(); $post = $e; ?> <tr> <td><?php if (isset($icons[$post->post_status])) { echo wpv_shortcode_icon(array('name' => $icons[$post->post_status], 'size' => 16)); } else { echo TribeCommunityEvents::instance()->getEventStatusIcon($post->post_status); }