| Server IP : 81.2.241.106 / Your IP : 216.73.216.165 Web Server : Apache/2.4.67 (Debian) System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : lisky ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/lisky/wp-content/plugins/events-manager/multilingual/ |
Upload File : |
<?php
/*
* Since translations of the original event post share certain information such as times, bookings and location, certain placeholders should be manipulated
* when showing a translation of the event.
*
* At this time, given that times etc. are copied to the translation we don't need to override anything, but you can add your own placeholders here via the
* em_ml_placeholders_event_placeholders filter and those placeholders will refer to the original event for data.
*/
class EM_ML_Placeholders {
public static $event_placeholders = array();
public static function init(){
self::$event_placeholders = apply_filters('em_ml_placeholders_event_placeholders',self::$event_placeholders);
if( !empty(self::$event_placeholders) ){
add_filter('em_event_output_placeholder','EM_ML_Placeholders::override_placeholders',100,3); //override bookign form
}
}
/**
* Certain placeholders, specifically booking placeholders, will take information from the original event, so we generate the
* @param string $replace
* @param EM_Event $EM_Event
* @param string $full_result
* @return string
*/
public static function override_placeholders($replace, $EM_Event, $full_result){
global $em_wpml_original_events_cache;
if( in_array($full_result, EM_ML_Placeholders::$event_placeholders) ){
$event = EM_ML::get_original_event($EM_Event); //get the master event info, for later use
if( $event->event_id != $EM_Event->event_id ){
remove_filter('em_event_output_placeholder','EM_ML_Placeholders::override_placeholders',100,3); //override bookign form
$replace = $event->output($full_result);
add_filter('em_event_output_placeholder','EM_ML_Placeholders::override_placeholders',100,3); //override bookign form
}
}
return $replace;
}
}
EM_ML_Placeholders::init();