Thank you.
I do that and it’s work, do you think i could do simpler ?
add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);
function my_em_placeholder_mod($replace, $EM_Location, $result){
if ( $result == '#_LOCATIONPASTEVENTS' ) {
$events_count = EM_Events::count( array('location'=>$EM_Location->location_id, 'scope'=>$scope) );
if ( $events_count > 0 ){
$args = array('location'=>$EM_Location->location_id, 'scope'=>$scope, 'pagination'=>1, 'ajax'=>0);
$args['format_header'] = get_option('dbem_location_event_list_item_header_format');
$args['format_footer'] = get_option('dbem_location_event_list_item_footer_format');
$args['format'] = get_option('dbem_location_event_list_item_format');
$args['limit'] = get_option('dbem_location_event_list_limit');
$args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
$args['orderby'] = "event_end_date";//ordre d'apparition
$args['order'] ="DESC";
$replace = EM_Events::output($args);
} else {
$replace = get_option('dbem_location_no_events_message');
}
}
return $replace;
}