/** * Returns custom meta. * * @param string $meta_id The meta group this is in. * @return string The custom meta. * @author Timothy Wood * @since 3.0 */ public static function custom_meta($meta_id) { global $_tribe_meta_factory; $fields = tribe_get_custom_fields(get_the_ID()); $custom_meta = ''; foreach ($fields as $label => $value) { $custom_meta .= Tribe_Meta_Factory::template($label, $value, $meta_id); } return apply_filters('tribe_event_pro_meta_custom_meta', $custom_meta); }
/** * Returns custom meta. * * @deprecated since 3.6 * * @param string $meta_id The meta group this is in. * * @return string The custom meta. */ public static function custom_meta($meta_id) { _deprecated_function(__METHOD__, '4.3'); $fields = tribe_get_custom_fields(get_the_ID()); $custom_meta = ''; foreach ($fields as $label => $value) { $custom_meta .= Tribe__Events__Meta_Factory::template($label, $value, $meta_id); } return apply_filters('tribe_event_pro_meta_custom_meta', $custom_meta); }
/** * Event Custom Fields (Display) * * Display a definition term list of custom fields * * @param int $postId (optional) * @since 2.0 */ function tribe_the_custom_fields($postId = null, $echo = true) { $fields = tribe_get_custom_fields($postId); $meta_html = ''; foreach ($fields as $label => $value) { $meta_html .= apply_filters('tribe_the_custom_field', sprintf('<dt>%s</dt><dd class="tribe-events-meta-custom-data">%s</dd>', $label, $value), $label, $value); } $meta_html = apply_filters('tribe_the_custom_fields', $meta_html); if ($echo) { echo $meta_html; } else { return $meta_html; } }
?> <dt>Register:</dt> <dd class="event-meta event-reg-link"> <a href="<?php echo $reglink; ?> ">Register Here</a> </dd> <?php } ?> </dl> <?php if (function_exists('tribe_the_custom_fields') && tribe_get_custom_fields(get_the_ID())) { ?> <?php tribe_the_custom_fields(get_the_ID()); ?> <?php } ?> </div> <?php if (tribe_embed_google_map(get_the_ID())) { ?> <?php
/** * Event Custom Fields (Display) * * Display a definition term list of custom fields * * @param int $postId (optional) * * @deprecated * @todo remove in 3.11 */ function tribe_the_custom_fields($postId = null, $echo = true) { _deprecated_function(__FUNCTION__, '3.9', "tribe_get_template_part( 'pro/modules/meta/additional-fields', null, array(\r\n\t\t\t'fields' => tribe_get_custom_fields()\r\n\t\t) );"); ob_start(); tribe_get_template_part('pro/modules/meta/additional-fields', null, array('fields' => tribe_get_custom_fields())); $html = ob_get_clean(); if (has_filter('tribe_the_custom_fields')) { _deprecated_function("The 'tribe_the_custom_fields' filter", '3.9', " the 'tribe_get_template_part_content' filter for pro/modules/meta/additional-fields"); $html = apply_filters('tribe_the_custom_fields', $html); } if ($echo) { echo $html; } else { return $html; } }
/** * Event Custom Fields (Display) * * Display a definition term list of custom fields * * @param int $postId (optional) * @since 2.0 */ function tribe_the_custom_fields($postId = null) { $fields = tribe_get_custom_fields($postId); $meta_html = "<dl class='column'>\n"; foreach ($fields as $label => $value) { $meta_html .= apply_filters('tribe_the_custom_field', "<dt class=\"tribe-custom-label\">" . stripslashes($label) . ":</dt><dd class=\"tribe-custom-meta\">" . stripslashes($value) . "</dd>\n", $label, $value); } $meta_html .= "</dl>\n"; echo apply_filters('tribe_the_custom_fields', $meta_html); }