Пример #1
0
 /**
  * Get Event Custom Field by Label
  *
  * retrieve a custom field's value by searching its label
  * instead of its (more obscure) ID
  *
  * @since 2.0.3
  * @param (string) $label, the label to search for
  * @param (int) $eventID (optional), the event to look for, defaults to global $post
  * @return (string) value of the field
  */
 function tribe_get_custom_field($label, $eventID = null)
 {
     return apply_filters('tribe_get_custom_field', TribeEventsCustomMeta::get_custom_field_by_label($label, $eventID));
 }
Пример #2
0
 /**
  * Echo Event Custom Field by Label
  *
  * same as above but echo instead of return
  *
  * @param (string) $label, the label to search for
  * @param (int) $eventID (optional), the event to look for, defaults to global $post
  *
  * @return (string) value of the field
  * @deprecated
  * @todo   remove in 3.11
  */
 function tribe_custom_field($label, $eventID = null)
 {
     _deprecated_function(__FUNCTION__, '3.9', "tribe_get_custom_fields");
     $field = TribeEventsCustomMeta::get_custom_field_by_label($label, $eventID);
     echo $field;
 }