Created
July 23, 2015 20:17
-
-
Save barryhughes/21c4e2fc52aec514cc9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns the contents of the event cost field without applying any | |
* formatting tricks. | |
* | |
* Useful in those cases where a non-standard cost values such as | |
* "ABC-123" is used, else they may be "mangled" by the | |
* Tribe__Events__Cost_Utils object. | |
* | |
* @param string $cost (unused) | |
* @param int $post_id | |
* @return string | |
*/ | |
function verbatim_cost_field( $cost, $post_id ) { | |
return esc_html( get_post_meta( $post_id, '_EventCost', true ) ); | |
} | |
add_filter( 'tribe_get_cost', 'verbatim_cost_field', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment