zerowastefvg
Forum Replies Created
-
I found something that works for me: I’ve added “X-WR-TIMEZONE:Europe/Rome” to the .ics ??
I have the same problem! ?? any solution?
$EM_Event contains also other data, I just posted an example easy to understand, you can also use $EM_Location and get all sort of data connected to the event like the address (
$EM_Event->location->location_address
): when you have the object and you can play with PHP you can do whatever you like. I also needed to manipulate the data output so it solves 2 problems at the same time.- This reply was modified 5 years, 7 months ago by zerowastefvg.
Thanks to @manzoorwanijk and his great help I could join together all the pieces (so also thanks to all of you) and build the function I needed! ??
add_filter('wptelegram_p2tg_post_data_field_value', function ( $value, $field, $post ) { global $EM_Event; // Set the value according to the field. switch ( $field ) { // creates a new field since the metadata doesn't exists case 'cf:_event_name': // Get the value from EM_Event object $output = $EM_Event->event_name; $output = strtoupper($output); $value = $output; break; // modifies on the fly the value of some fields case 'cf:_event_start_time': case 'cf:_event_end_time' : // Get the value from existing metadata $value = date('G:i', strtotime($value)); break; } return $value; }, 10, 3 );
Hope this code could help also somebody else! ?
- This reply was modified 5 years, 7 months ago by zerowastefvg.
- This reply was modified 5 years, 7 months ago by zerowastefvg.
- This reply was modified 5 years, 7 months ago by zerowastefvg.
So how can I get the “missing data” (other fields) by post_meta?
- This reply was modified 5 years, 7 months ago by zerowastefvg.
this guy seemed to have the same problem years ago…but no solution was given:
https://www.ads-software.com/support/topic/get-all-post-meta/