vincentthinkr
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
thanks for your answer,
what do you thinks about this solution :
function custom_ics_calendar_shortcode($atts) {
$a = shortcode_atts( array(
'url' => '',
'title' => 'true',
'view' => 'month',
'maskinfo' => '',
'showendtimes' => 'false',
'format' => 'j F'
), $atts );
$response = wp_remote_head( $a['url'] );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
return '<p>No dates available</p>';
} else {
$shortcode = '[ics_calendar url="' . esc_url($a['url']) . '"'
. ' title="' . esc_attr($a['title']) . '"'
. ' view="' . esc_attr($a['view']) . '"'
. ' maskinfo="' . esc_attr($a['maskinfo']) . '"'
. ' showendtimes="' . esc_attr($a['showendtimes']) . '"'
. ' format="' . esc_attr($a['format']) . '"]';
return do_shortcode($shortcode);
}
}
add_shortcode('custom_ics_calendar', 'custom_ics_calendar_shortcode');That seems relevant to me, but am I perhaps missing something?
Forum: Plugins
In reply to: [ICS Calendar] issue on firefox withif it can help you, it’s work well on my main domain on this page for example https://thinkr.fr/formation-au-logiciel-r/creation-de-packages-r/ (I put an old plugin version, the 6.4.0)
Forum: Plugins
In reply to: [ICS Calendar] issue on firefox withthanks for your answer
did you try to put the code inside details balises ? :
<details> <summary>Voir les dates</summary> [ics_calendar url="https://thinkr.fr/ics/AF0100960275.ics" title="false" view="list" limitdays="800" maskinfo=" " showendtimes="true" format="j F"] </details>
I put an example here : https://thinkr.fr/abcdr/room34/
Viewing 3 replies - 1 through 3 (of 3 total)