How to hook a filter to catch get_post_meta when alternate a custom field output?
I have fill a custom field(meta data) in a post, just like this:
<!--:de-->Nominale spanning<!--:--><!--:zh/cn-->额定电压<!--:--><!--:en-->Arrester Accessories<!--:-->
I need to get this output translated,so I wondering how to hook into "get_post_meta" before the meta data output.
Here is what I've tried for a few days, but no luck.
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single){
$fieldtitle="fields_titles";
if($meta_key==$fieldtitle&& isset($meta_key)){
//here is the catch, but no value has been passed
}
}
//Specify 4 arguments for this filter in the last parameter.
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 10, 4);