y2kemo

tep cal

Jul 4th, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //Change event labels: Registration
  2. // Many pieces of meta info pass through this filter, not only custom fields
  3. add_filter('tribe_meta_factory_template', 'change_custom_fields', 20, 3);
  4.  
  5. function change_custom_fields($html, $label, $meta) {
  6. // We are only interested in one specific custom field
  7. if ('Registration' !== $label) return $html;
  8.  
  9. // Swap out the current value for something else
  10.  
  11. return str_replace($meta, "<a href=$label>Click to Register</a>", $html);
  12.  
  13. //Change event labels: Finisher Form
  14. }
  15. { if ('Finisher Form' !== $label) return $html;
  16.  
  17. // Swap out the current value for something else
  18.  
  19. return str_replace($meta, "<a href=$label>Submit your results</a>", $html);
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment