/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php
// }
function get_session_registration($event_id, $session_id)
{
$registrations = get_field('registrations', $event_id);
$session_registration = array();
foreach ($registrations as $registration_id) {
$datas = get_field('form_datas', $registration_id);
if ($datas['session_id'] == $session_id) {
$session_registration[] = $registration_id;
}
}
return $session_registration;
}
function filter_order_sessions($sessions)
{
$current_time = new DateTime();
// Filtrer les sessions dont l'heure de début est dépassée
$filtered_sessions = array_filter($sessions, function ($session) use ($current_time) {
$session_start = new DateTime($session['session_start']);
return $session_start >= $current_time;
});
// Ordonner les sessions restantes par date et heure de début
usort($filtered_sessions, function ($a, $b) {
$start_a = new DateTime($a['session_start']);
$start_b = new DateTime($b['session_start']);
return $start_a <=> $start_b;
});
return $filtered_sessions;
}
function format_event_dates($start_date, $end_date)
{
// Convertir les chaînes de caractères en objets DateTime si nécessaire
if (is_string($start_date)) {
$start_date = new DateTime($start_date);
}
Arguments
"array_filter(): Argument #1 ($array) must be of type array, false given"
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php
// }
function get_session_registration($event_id, $session_id)
{
$registrations = get_field('registrations', $event_id);
$session_registration = array();
foreach ($registrations as $registration_id) {
$datas = get_field('form_datas', $registration_id);
if ($datas['session_id'] == $session_id) {
$session_registration[] = $registration_id;
}
}
return $session_registration;
}
function filter_order_sessions($sessions)
{
$current_time = new DateTime();
// Filtrer les sessions dont l'heure de début est dépassée
$filtered_sessions = array_filter($sessions, function ($session) use ($current_time) {
$session_start = new DateTime($session['session_start']);
return $session_start >= $current_time;
});
// Ordonner les sessions restantes par date et heure de début
usort($filtered_sessions, function ($a, $b) {
$start_a = new DateTime($a['session_start']);
$start_b = new DateTime($b['session_start']);
return $start_a <=> $start_b;
});
return $filtered_sessions;
}
function format_event_dates($start_date, $end_date)
{
// Convertir les chaînes de caractères en objets DateTime si nécessaire
if (is_string($start_date)) {
$start_date = new DateTime($start_date);
}
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
<div class="icol-6_md-12">
<div class="thumb rounded-global">
<?= get_post_thumbnail_id($post->ID) ? walt_get_media(get_post_thumbnail_id($post->ID), 704, 'wrapper-default', 'icol-6_md-12') : walt_get_media(get_field('default_publications_thumbnail_placeholder', 'option'), 'large') ?>
</div>
</div>
</div>
<?php if ($use_sessions):
// $sessions = ;
$sessions = filter_order_sessions(get_field('sessions', $id));
if ($sessions) : ?>
<div class="main_content_session">
<h2><?php _e('Nos prochaines sessions', 'static') ?></h2>
<?php foreach ($sessions as $session): ?>
<?php walt_template_part(WALT_CALENDAR_PATH_PARTS . '/components/session-accordion.php', array('to_buy' => false, 'session' => $session, 'event_id' => $post->ID)); ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php else : ?>
<div class="main_content_session">
<?php
$session = array(
'session_start' => get_field('event_start'),
'session_end' => get_field('event_end'),
'position' => get_field('event_localisation'),
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php
*/
$template = apply_filters( 'template_include', $template );
$is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
$template = $is_stringy ? realpath( (string) $template ) : null;
if (
is_string( $template ) &&
( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
is_file( $template ) &&
is_readable( $template )
) {
/**
* Fires immediately before including the template.
*
* @since 6.9.0
*
* @param string $template The path of the template about to be included.
*/
do_action( 'wp_before_include_template', $template );
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
Arguments
"/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php"
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
Arguments
"/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php"
/home/eyth8214/public_html/tpe/sauvetage-annecy/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Arguments
"/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-blog-header.php"