format('Y-m-d') !== $date) { status_header(404); return; } $title = wp_date(get_option('date_format'), $day->getTimestamp(), wp_timezone()); header('X-Robots-Tag: noindex, follow'); add_filter('pre_get_document_title', static fn (): string => $title . ' ยท ' . get_bloginfo('name')); wp_enqueue_style('pcwp-calendar-blocks'); echo ''; wp_head(); echo '
' . esc_html(get_bloginfo('name')) . '

' . esc_html($title) . '

'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- The registered calendar renderer escapes its output and supplies required navigation data attributes. echo render_block(['blockName' => 'pro-calendar-wp/day-calendar', 'attrs' => ['query' => ['pcwpStart' => $date], 'instance' => 'day-landing'], 'innerBlocks' => [], 'innerHTML' => '', 'innerContent' => []]); echo '
'; wp_footer(); echo ''; exit; } }