<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[14004] sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events: Translate: Sync "Translation Events" from GitHub</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/14004">14004</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/14004","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>amieiro</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-08-28 17:14:01 +0000 (Wed, 28 Aug 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Translate: Sync "Translation Events" from GitHub</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsautoloadphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/autoload.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesattendeeattendeerepositoryphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/attendee/attendee-repository.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventformhandlerphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-form-handler.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventrepositoryinterfacephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository-interface.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventrepositoryphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesroutesusermyeventsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/user/my-events.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventstemplatespartsheaderphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/parts/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksfooterindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/index.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksfooterrenderphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/render.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksheaderrenderphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/header/render.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockspageseventsmyeventsrenderphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/pages/events/my-events/render.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024functionsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024stylecss">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/style.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventswporggptranslationeventsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/wporg-gp-translation-events.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesrouteseventrssphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/event/rss.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/</li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/</li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleblockjson">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/block.json</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleeditjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/edit.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleeditorscss">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/editor.scss</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleindexjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexamplesavejs">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/save.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexamplestylescss">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/style.scss</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleviewjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/view.js</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventattendancemodeindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventdateindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventexcerptindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventflagindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventlistindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventtemplateindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/index.php</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventtitleindexphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/index.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsautoloadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/autoload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/autoload.php 2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/autoload.php   2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,6 +15,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/event/image.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/event/list-trashed.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/event/translations.php';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+require_once __DIR__ . '/includes/routes/event/rss.php';
</ins><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/user/attend-event.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/user/host-event.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require_once __DIR__ . '/includes/routes/user/my-events.php';
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesattendeeattendeerepositoryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/attendee/attendee-repository.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/attendee/attendee-repository.php    2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/attendee/attendee-repository.php      2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,6 +5,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> use Exception;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> class Attendee_Repository {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+       private array $cached_current_user_attendee = array();
+
</ins><span class="cx" style="display: block; padding: 0 10px">         /**
</span><span class="cx" style="display: block; padding: 0 10px">         * @throws Exception
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -94,7 +97,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @throws Exception
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_attendee_for_event_for_user( int $event_id, int $user_id ): ?Attendee {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $attendees = $this->get_attendees_for_events_for_user( array( $event_id ), $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $attendees = $this->get_attendees_for_user_for_events( $user_id, array( $event_id ), );
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( 1 !== count( $attendees ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return null;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,16 +104,46 @@
</span><span class="cx" style="display: block; padding: 0 10px">                return $attendees[ $event_id ];
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public function is_user_attending( int $event_id, int $user_id ): ?Attendee {
+               if ( ! isset( $this->cached_current_user_attendee[ $user_id ] ) ) {
+                       $this->cached_current_user_attendee[ $user_id ] = $this->get_attendees_for_user_for_events( $user_id );
+               }
+               $is_attending = $this->cached_current_user_attendee[ $user_id ][ $event_id ] ?? null;
+
+               return $is_attending;
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * @var int $user_id
+        * @return object
+        * @throws Exception
+        */
+       public function get_user_attended_events( int $user_id ): array {
+               global $wpdb, $gp_table_prefix;
+               // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+               // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery
+               // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
+               $event_ids = $wpdb->get_col(
+                       $wpdb->prepare(
+                               "
+                                       select
+                                               event_id
+                                       from {$gp_table_prefix}event_attendees attendees
+                                       where user_id = %d
+                               ",
+                               $user_id
+                       )
+               );
+               // phpcs:enable
+               return $event_ids;
+       }
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * @var int[] $event_ids
</span><span class="cx" style="display: block; padding: 0 10px">         * @return Attendee[] Associative array with event id as key.
</span><span class="cx" style="display: block; padding: 0 10px">         * @throws Exception
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function get_attendees_for_events_for_user( array $event_ids, int $user_id ): array {
-               if ( empty( $event_ids ) ) {
-                       return array();
-               }
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_attendees_for_user_for_events( int $user_id, array $event_ids = array() ): array {
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Prevent SQL injection.
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $event_ids as $event_id ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( is_numeric( $event_id ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -122,8 +155,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                global $wpdb, $gp_table_prefix;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $and_event_ids   = '';
</ins><span class="cx" style="display: block; padding: 0 10px">                 $event_id_params = implode( ',', array_fill( 0, count( $event_ids ), '%d' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( ! empty( $event_ids ) ) {
+                       $and_event_ids = 'and event_id in (' . $event_id_params . ')';
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,18 +181,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                          and user_id = attendees.user_id
</span><span class="cx" style="display: block; padding: 0 10px">                                                ) as locales
</span><span class="cx" style="display: block; padding: 0 10px">                                        from {$gp_table_prefix}event_attendees attendees
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        where event_id in ($event_id_params)
-                                         and user_id = %d
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 where user_id = %d {$and_event_ids}
</ins><span class="cx" style="display: block; padding: 0 10px">                                 ",
</span><span class="cx" style="display: block; padding: 0 10px">                                array_merge(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        $event_ids,
</del><span class="cx" style="display: block; padding: 0 10px">                                         array( $user_id ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                        $event_ids
</ins><span class="cx" style="display: block; padding: 0 10px">                                 )
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        OBJECT_K
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:enable
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 return array_map(
</span><span class="cx" style="display: block; padding: 0 10px">                        function ( $row ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                return new Attendee(
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventformhandlerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-form-handler.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-form-handler.php        2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-form-handler.php  2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -237,6 +237,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $event_status,
</span><span class="cx" style="display: block; padding: 0 10px">                        $title,
</span><span class="cx" style="display: block; padding: 0 10px">                        $description,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        null,
</ins><span class="cx" style="display: block; padding: 0 10px">                         $attendance_mode,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $event->set_id( intval( $event_id ) );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventrepositoryinterfacephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository-interface.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository-interface.php        2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository-interface.php  2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,7 +89,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_past_events( int $page = -1, int $page_size = -1 ): Events_Query_Result;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * Get events that are trashed.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * Get events that are currently active or happening in the future.
</ins><span class="cx" style="display: block; padding: 0 10px">          *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param int $page      Index of the page to return.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param int $page_size Page size.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,6 +97,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return Events_Query_Result
</span><span class="cx" style="display: block; padding: 0 10px">         * @throws Exception
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public function get_current_and_upcoming_events( int $page = - 1, int $page_size = - 1 ): Events_Query_Result;
+
+               /**
+                * Get events that are trashed.
+                *
+                * @param int $page      Index of the page to return.
+                * @param int $page_size Page size.
+                *
+                * @return Events_Query_Result
+                * @throws Exception
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">         public function get_trashed_events( int $page = -1, int $page_size = -1 ): Events_Query_Result;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,9 +196,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public int $current_page;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public array $event_ids;
+
</ins><span class="cx" style="display: block; padding: 0 10px">         public function __construct( array $events, int $current_page, int $page_count ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->events = $events;
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->events    = $events;
+               $this->event_ids = array_map(
+                       function ( $event ) {
+                               return $event->id();
+                       },
+                       $events,
+               );
</ins><span class="cx" style="display: block; padding: 0 10px">                 // The call to intval() is required because WP_Query::max_num_pages is sometimes a float, despite being type-hinted as int.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->page_count   = intval( $page_count );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->current_page = intval( $current_page );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventrepositoryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php  2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php    2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +121,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array( '%d' ),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:enable
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 return $event;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,10 +143,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $post->post_status,
</span><span class="cx" style="display: block; padding: 0 10px">                                $post->post_title,
</span><span class="cx" style="display: block; padding: 0 10px">                                $post->post_content,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                $post->post_modified_gmt ? new DateTimeImmutable( $post->post_modified_gmt ) : null,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $meta['attendance_mode'],
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px">                        $event->set_id( $post->ID );
</span><span class="cx" style="display: block; padding: 0 10px">                        $event->set_slug( $post->post_name );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                         return $event;
</span><span class="cx" style="display: block; padding: 0 10px">                } catch ( Exception $e ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        // This should not be possible as it means data in the database is invalid.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -217,6 +218,31 @@
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:enable
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public function get_current_and_upcoming_events( int $page = - 1, int $page_size = - 1 ): Events_Query_Result {
+               // phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_meta_query
+               // phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_meta_key
+               // phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_meta_value
+               return $this->execute_events_query(
+                       $page,
+                       $page_size,
+                       array(
+                               'meta_query' => array(
+                                       array(
+                                               'key'     => '_event_end',
+                                               'value'   => $this->now->format( 'Y-m-d H:i:s' ),
+                                               'compare' => '>',
+                                               'type'    => 'DATETIME',
+                                       ),
+                               ),
+                               'meta_key'   => '_event_start',
+                               'orderby'    => array(
+                                       'meta_value' => 'ASC',
+                                       'ID'         => 'ASC',
+                               ),
+                       ),
+               );
+               // phpcs:enable
+       }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_trashed_events( int $page = - 1, int $page_size = - 1 ): Events_Query_Result {
</span><span class="cx" style="display: block; padding: 0 10px">                return $this->execute_events_query(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -544,11 +570,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $post->post_status,
</span><span class="cx" style="display: block; padding: 0 10px">                                $title,
</span><span class="cx" style="display: block; padding: 0 10px">                                $post->post_content,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                $post->post_modified_gmt ? new DateTimeImmutable( $post->post_modified_gmt ) : null,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $meta['attendance_mode'],
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px">                        $event->set_id( $post->ID );
</span><span class="cx" style="display: block; padding: 0 10px">                        $event->set_slug( $post->post_name );
</span><span class="cx" style="display: block; padding: 0 10px">                        $events[] = $event;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return new Events_Query_Result( $events, $page, $query->max_num_pages );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludeseventeventphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php     2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php       2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,6 +42,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        private string $status;
</span><span class="cx" style="display: block; padding: 0 10px">        private string $title;
</span><span class="cx" style="display: block; padding: 0 10px">        private string $description;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        private DateTimeImmutable $updated_at;
</ins><span class="cx" style="display: block; padding: 0 10px">         private string $attendance_mode;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,6 +58,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                string $status,
</span><span class="cx" style="display: block; padding: 0 10px">                string $title,
</span><span class="cx" style="display: block; padding: 0 10px">                string $description,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                DateTimeImmutable $updated_at = null,
</ins><span class="cx" style="display: block; padding: 0 10px">                 string $attendance_mode = 'onsite'
</span><span class="cx" style="display: block; padding: 0 10px">        ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->author_id = $author_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -67,6 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->set_status( $status );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->set_title( $title );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->set_description( $description );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $this->set_updated_at( $updated_at );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->set_attendance_mode( $attendance_mode );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,6 +138,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                return $this->description;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public function updated_at(): DateTimeImmutable {
+               return $this->updated_at;
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         public function set_id( int $id ): void {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->id = $id;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -177,6 +184,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->description = $description;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        public function set_updated_at( DateTimeImmutable $updated_at = null ): void {
+               $this->updated_at = $updated_at ?? Translation_Events::now();
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         public function set_attendance_mode( string $attendance_mode ): void {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->attendance_mode = $attendance_mode;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesrouteseventrssphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/event/rss.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/event/rss.php                                (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/event/rss.php  2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,112 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace Wporg\TranslationEvents\Routes\Event;
+
+use DateTimeInterface;
+use Wporg\TranslationEvents\Event\Event;
+use Wporg\TranslationEvents\Event\Event_Repository_Interface;
+use Wporg\TranslationEvents\Routes\Route;
+use Wporg\TranslationEvents\Translation_Events;
+use Wporg\TranslationEvents\Urls;
+
+/**
+ * Displays the RSS page.
+ */
+class Rss_Route extends Route {
+       private Event_Repository_Interface $event_repository;
+
+       /**
+        * Rss_Route constructor.
+        */
+       public function __construct() {
+               parent::__construct();
+               $this->event_repository = Translation_Events::get_event_repository();
+       }
+
+       /**
+        * Handle the request.
+        *
+        * @return void
+        */
+       public function handle(): void {
+               $current_events_query = $this->event_repository->get_current_and_upcoming_events( 1, 20 );
+               $rss_feed             = $this->get_rss_20_header( $current_events_query->events );
+
+               foreach ( $current_events_query->events as $event ) {
+                       $rss_feed .= $this->get_item( $event );
+               }
+               $rss_feed .= $this->get_rss_20_footer();
+
+               header( 'Content-Type: application/xml; charset=UTF-8' );
+               // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
+               echo $rss_feed;
+               exit();
+       }
+
+       /**
+        * Get the RSS 2.0 header.
+        *
+        * @return string
+        */
+       private function get_rss_20_header( array $events ): string {
+               $header  = '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:ev="http://purl.org/rss/1.0/modules/event/">';
+               $header .= '    <channel>';
+               $header .= '        <title>' . esc_html__( 'WordPress.org Global Translation Events', 'gp-translation-events' ) . '</title>';
+               $header .= '        <link>' . esc_url( home_url( gp_url( '/events' ) ) ) . '</link>';
+               $header .= '        <description>' . esc_html__( 'WordPress.org Global Translation Events', 'gp-translation-events' ) . '</description>';
+               $header .= '        <language>en-us</language>';
+               $header .= '        <pubDate>' . esc_html( $this->document_pub_and_build_date( $events ) ) . '</pubDate>';
+               $header .= '        <lastBuildDate>' . esc_html( $this->document_pub_and_build_date( $events ) ) . '</lastBuildDate>';
+               $header .= '        <docs>https://www.rssboard.org/rss-specification</docs>';
+               $header .= '        <generator>' . esc_html__( 'Translation Events', 'gp-translation-events' ) . '</generator>';
+               $header .= '        <atom:link href="' . esc_url( home_url( gp_url( '/events/rss' ) ) ) . '" rel="self" type="application/rss+xml"/>';
+               return $header;
+       }
+
+       /**
+        * Get the RSS 2.0 footer.
+        *
+        * @return string
+        */
+       private function get_rss_20_footer(): string {
+               $footer  = '    </channel>';
+               $footer .= '</rss>';
+               return $footer;
+       }
+
+       private function get_item( Event $event ) {
+               $item  = '      <item>';
+               $item .= '          <title>' . esc_html( $event->title() ) . '</title>';
+               $item .= '          <link>' . esc_url( home_url( gp_url( gp_url_join( 'events', $event->slug() ) ) ) ) . '</link>';
+               $item .= '          <description>' . esc_html( $event->description() ) . '</description>';
+               $item .= '          <enclosure url="' . esc_url( Urls::event_image( $event->id() ) ) . '" type="image/png" length="1200" />';
+               $item .= '          <pubDate>' . esc_html( $event->updated_at()->format( DATE_RSS ) ) . '</pubDate>';
+               $item .= '          <ev:startdate>' . esc_html( $event->start()->format( DateTimeInterface::ATOM ) ) . '</ev:startdate>';
+               $item .= '          <ev:enddate>' . esc_html( $event->end()->format( DateTimeInterface::ATOM ) ) . '</ev:enddate>';
+               $item .= '          <guid>' . esc_url( home_url( gp_url( gp_url_join( 'events', $event->slug() ) ) ) ) . '</guid>';
+               $item .= '      </item>';
+               return $item;
+       }
+
+       /**
+        * Get the most recent event's pub date.
+        *
+        * @param Event[] $events Array of events to use for the pub date.
+        *
+        * @return string|null
+        */
+       private function document_pub_and_build_date( array $events ): ?string {
+               if ( empty( $events ) ) {
+                       return null;
+               }
+
+               $pub_date = $events[0]->updated_at();
+               foreach ( $events as $event ) {
+                       if ( $event->updated_at() > $pub_date ) {
+                               $pub_date = $event->updated_at();
+                       }
+               }
+
+               return $pub_date->format( DATE_RSS );
+       }
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/event/rss.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsincludesroutesusermyeventsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/user/my-events.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/user/my-events.php   2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/routes/user/my-events.php     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,22 +40,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:enable
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $events = $this->event_repository->get_events_for_user( get_current_user_id(), $page, 10 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $events    = $this->event_repository->get_events_for_user( get_current_user_id(), $page, 10 );
+               $event_ids = $events->event_ids;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $event_ids = array_map(
-                       function ( $event ) {
-                               return $event->id();
-                       },
-                       $events->events,
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $current_user_attendee_per_event = $this->attendee_repository->get_attendees_for_user_for_events( $user_id, $event_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $current_user_attendee_per_event = $this->attendee_repository->get_attendees_for_events_for_user( $event_ids, $user_id );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->use_theme();
</span><span class="cx" style="display: block; padding: 0 10px">                $this->tmpl(
</span><span class="cx" style="display: block; padding: 0 10px">                        'my-events',
</span><span class="cx" style="display: block; padding: 0 10px">                        compact(
</span><span class="cx" style="display: block; padding: 0 10px">                                'events',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'event_ids',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'current_user_attendee_per_event'
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleblockjson"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/block.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/block.json                                (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/block.json  2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,19 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+{
+       "$schema": "https://schemas.wp.org/trunk/block.json",
+       "apiVersion": 3,
+       "name": "wporg-translate-events/example",
+       "version": "0.1.0",
+       "title": "Example block",
+       "category": "widgets",
+       "icon": "smiley",
+       "description": "Example block.",
+       "example": {},
+       "supports": {
+               "html": false
+       },
+       "textdomain": "gp-translation-events",
+       "editorScript": "file:./index.js",
+       "editorStyle": "file:./index.css",
+       "style": "file:./style-index.css",
+       "viewScript": "file:./view.js"
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleeditjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/edit.js                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/edit.js     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,38 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Retrieves the translation of text.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
+ */
+import { __ } from '@wordpress/i18n';
+
+/**
+ * React hook that is used to mark the block wrapper element.
+ * It provides all the necessary props like the class name.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
+ */
+import { useBlockProps } from '@wordpress/block-editor';
+
+/**
+ * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
+ * Those files can contain any CSS code that gets applied to the editor.
+ *
+ * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
+ */
+import './editor.scss';
+
+/**
+ * The edit function describes the structure of your block in the context of the
+ * editor. This represents what the editor will render when the block is used.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
+ *
+ * @return {Element} Element to render.
+ */
+export default function Edit() {
+       return (
+               <p { ...useBlockProps() }>
+                       { __( 'Example â€“ hello from the editor!', 'example' ) }
+               </p>
+       );
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleeditorscss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/editor.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/editor.scss                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/editor.scss 2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,9 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * The following styles get applied inside the editor only.
+ *
+ * Replace them with your own styles or remove the file completely.
+ */
+
+.wp-block-create-block-example {
+       border: 1px dotted #f00;
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleindexjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.js                          (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.js    2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,39 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Registers a new block provided a unique name and an object defining its behavior.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
+ */
+import { registerBlockType } from '@wordpress/blocks';
+
+/**
+ * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
+ * All files containing `style` keyword are bundled together. The code used
+ * gets applied both to the front of your site and to the editor.
+ *
+ * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
+ */
+import './style.scss';
+
+/**
+ * Internal dependencies
+ */
+import Edit from './edit';
+import save from './save';
+import metadata from './block.json';
+
+/**
+ * Every block starts by registering a new block type definition.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
+ */
+registerBlockType( metadata.name, {
+       /**
+        * @see ./edit.js
+        */
+       edit: Edit,
+
+       /**
+        * @see ./save.js
+        */
+       save,
+} );
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.php                         (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.php   2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,16 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+namespace Wporg\TranslationEvents\Blocks\Example;
+
+add_action( 'init', __NAMESPACE__ . '\init' );
+
+/**
+ * Registers the block using the metadata loaded from the `block.json` file.
+ * Behind the scenes, it registers also all assets so they can be enqueued
+ * through the block editor in the corresponding context.
+ *
+ * @see https://developer.wordpress.org/reference/functions/register_block_type/
+ */
+function init() {
+       register_block_type( __DIR__ . '/../../../build/blocks/example' );
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexamplesavejs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/save.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/save.js                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/save.js     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,24 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * React hook that is used to mark the block wrapper element.
+ * It provides all the necessary props like the class name.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
+ */
+import { useBlockProps } from '@wordpress/block-editor';
+
+/**
+ * The save function defines the way in which the different attributes should
+ * be combined into the final markup, which is then serialized by the block
+ * editor into `post_content`.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
+ *
+ * @return {Element} Element to render.
+ */
+export default function save() {
+       return (
+               <p { ...useBlockProps.save() }>
+                       { 'Example â€“ hello from the saved content!' }
+               </p>
+       );
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexamplestylescss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/style.scss</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/style.scss                                (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/style.scss  2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,12 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * The following styles get applied both on the front of your site
+ * and in the editor.
+ *
+ * Replace them with your own styles or remove the file completely.
+ */
+
+.wp-block-create-block-example {
+       background-color: #21759b;
+       color: #fff;
+       padding: 2px;
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventssrcblocksexampleviewjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/view.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/view.js                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/src/blocks/example/view.js     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,25 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Use this file for JavaScript code that you want to run in the front-end
+ * on posts/pages that contain this block.
+ *
+ * When this file is defined as the value of the `viewScript` property
+ * in `block.json` it will be enqueued on the front end of the site.
+ *
+ * Example:
+ *
+ * ```js
+ * {
+ *   "viewScript": "file:./view.js"
+ * }
+ * ```
+ *
+ * If you're not making any changes to this file because your project doesn't need any
+ * JavaScript running in the front-end, then you should delete this file and remove
+ * the `viewScript` property from `block.json`.
+ *
+ * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script
+ */
+
+/* eslint-disable no-console */
+console.log( 'Hello World! (from create-block-example block)' );
+/* eslint-enable no-console */
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventstemplatespartsheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/parts/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/parts/header.php   2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/parts/header.php     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,6 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action(
</span><span class="cx" style="display: block; padding: 0 10px">        'gp_head',
</span><span class="cx" style="display: block; padding: 0 10px">        function () use ( $html_title, $url, $html_description, $image_url ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                echo '<link rel="alternate" type="application/rss+xml" title="' . esc_html__( 'Translating Events &raquo; WordPress Feed', 'gp-translation-events' ) . '" href="' . esc_url( home_url( gp_url( '/events/feed' ) ) ) . '" />' . "\n";
</ins><span class="cx" style="display: block; padding: 0 10px">                 echo '<meta name="twitter:card" content="summary" />' . "\n";
</span><span class="cx" style="display: block; padding: 0 10px">                echo '<meta name="twitter:site" content="@WordPress" />' . "\n";
</span><span class="cx" style="display: block; padding: 0 10px">                echo '<meta name="twitter:title" content="' . esc_attr( $html_title ) . '" />' . "\n";
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventattendancemodeindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/index.php                            (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/index.php      2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,23 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+register_block_type(
+       'wporg-translate-events-2024/event-attendance-mode',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $block->context['postId'] ) ) {
+                               return '';
+                       }
+                       $event_id = $block->context['postId'];
+                       $event = Translation_Events::get_event_repository()->get_event( $event_id );
+                       if ( ! $event ) {
+                               return '';
+                       }
+
+                       return '<div class="wporg-marker-list-item__attendance-mode">
+' . esc_html( $event->attendance_mode() ) . '</div>';
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-attendance-mode/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventdateindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/index.php                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/index.php 2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,41 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+register_block_type(
+       'wporg-translate-events-2024/event-start',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $block->context['postId'] ) ) {
+                               return '';
+                       }
+                       $event_id = get_the_ID();
+                       $event = Translation_Events::get_event_repository()->get_event( $event_id );
+                       if ( ! $event ) {
+                               return '';
+                       }
+                       $start = $event->start()->format( 'F j, Y' );
+                       return '<time class="wporg-marker-list-item__date-time">' . esc_html( $start ) . '</time>';
+               },
+       )
+);
+
+register_block_type(
+       'wporg-translate-events-2024/event-end',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $block->context['postId'] ) ) {
+                               return '';
+                       }
+                       $event_id = $block->context['postId'];
+                       $event = Translation_Events::get_event_repository()->get_event( $event_id );
+                       if ( ! $event ) {
+                               return '';
+                       }
+                       $end = $event->end()->format( 'F j, Y' );
+                       return '<p>' . esc_html( $end ) . '</p>';
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-date/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventexcerptindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/index.php                            (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/index.php      2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,12 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+register_block_type(
+       'wporg-translate-events-2024/event-excerpt',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes ) {
+                       return '<p>' . esc_html( get_the_excerpt( $attributes['id'] ) ) . '</p>';
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-excerpt/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventflagindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/index.php                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/index.php 2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,38 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+register_block_type(
+       'wporg-translate-events-2024/event-flag',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $block->context['postId'] ) ) {
+                               return '';
+                       }
+                       $event_id = $block->context['postId'];
+                       $event = Translation_Events::get_event_repository()->get_event( $event_id );
+                       if ( ! $event ) {
+                               return '';
+                       }
+                       $current_user_attendee = Translation_Events::get_attendee_repository()->is_user_attending( $event_id, get_current_user_id() );
+                       $event_flag = false;
+                       if ( $current_user_attendee ) {
+                               $event_flag = 'Attending';
+                               if ( $current_user_attendee->is_host() ) {
+                                       $event_flag = 'Host';
+                               }
+                       }
+
+                       if ( ! $event_flag ) {
+                               return '';
+                       }
+
+                       ob_start();
+                       ?>
+                       <span class="my-event-flag"><?php echo esc_html( $event_flag ); ?></span>
+                       <?php
+                       return ob_get_clean();
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-flag/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventlistindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/index.php                               (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/index.php 2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,45 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+
+register_block_type(
+       'wporg-translate-events-2024/event-list',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes ) {
+                       $event_ids = $attributes['event_ids'] ?? array();
+
+                       if ( empty( $event_ids ) ) {
+                               return;
+                       }
+
+                       ob_start();
+                       ?>
+                       <div class="wp-block-wporg-event-list">
+                       <ul class="wporg-marker-list__container">
+                               <?php
+                               foreach ( $event_ids as $event_id ) {
+                                       ?>
+                                       <li class="wporg-marker-list-item">
+                                               <!-- wp:wporg-translate-events-2024/event-template <?php echo wp_json_encode( array( 'id' => $event_id ) ); ?> -->
+                                               <div>
+                                                       <!-- wp:wporg-translate-events-2024/event-title /-->
+                                                       <!-- wp:wporg-translate-events-2024/event-flag /-->
+                                               </div>
+                                               <!-- wp:wporg-translate-events-2024/event-attendance-mode /-->
+                                               <!-- wp:wporg-translate-events-2024/event-start /-->
+                                               <!-- /wp:wporg-translate-events-2024/event-list-->
+
+                                               <!-- /wp:wporg-translate-events-2024/event-template -->
+                                       </li>
+                                       <?php
+                               }
+                               ?>
+                       </ul>
+                       </div>
+                       <?php
+                       return ob_get_clean();
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-list/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventtemplateindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/index.php                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/index.php     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,39 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+
+register_block_type(
+       'wporg-translate-events-2024/event-template',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $attributes['id'] ) ) {
+                               return '';
+                       }
+
+                       $query = new \WP_Query(
+                               array(
+                                       'p'         => intval( $attributes['id'] ),
+                                       'post_type' => Translation_Events::CPT,
+                               )
+                       );
+
+                       $block_content = '';
+                       while ( $query->have_posts() ) {
+                               $query->the_post();
+                               $block_instance = $block->parsed_block;
+                               $filter_block_context = static function ( $context ) use ( $attributes ) {
+                                       $context['postId'] = $attributes['id'];
+                                       $context['postType'] = Translation_Events::CPT;
+                                       return $context;
+                               };
+
+                               // Use an early priority to so that other 'render_block_context' filters have access to the values.
+                               add_filter( 'render_block_context', $filter_block_context, 1 );
+                               $block_content = ( new \WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) );
+                               remove_filter( 'render_block_context', $filter_block_context, 1 );
+                       }
+                       wp_reset_postdata();
+                       return $block_content;
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-template/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockseventtitleindexphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/index.php                              (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/index.php        2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,31 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php namespace Wporg\TranslationEvents\Theme_2024;
+use Wporg\TranslationEvents\Translation_Events;
+use Wporg\TranslationEvents\Urls;
+
+
+register_block_type(
+       'wporg-translate-events-2024/event-title',
+       array(
+               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
+               'render_callback' => function ( array $attributes, $content, $block ) {
+                       if ( ! isset( $block->context['postId'] ) ) {
+                               return '';
+                       }
+                       $event_id = get_the_ID();
+                       ob_start();
+                       $event = Translation_Events::get_event_repository()->get_event( $event_id );
+                       if ( ! $event ) {
+                               return '';
+                       }
+                       $url = Urls::event_details( $event->id() );
+                       ?>
+                       <h3 class="wporg-marker-list-item__title">
+                                       <a href="<?php echo esc_url( $url ); ?>">
+                                               <?php echo esc_html( $event->title() ); ?>
+                                       </a>
+                               </h3>
+                       <?php
+                       return ob_get_clean();
+               },
+       )
+);
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/event-title/index.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksfooterindexphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/index.php   2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/index.php     2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,13 +3,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> register_block_type(
</span><span class="cx" style="display: block; padding: 0 10px">        'wporg-translate-events-2024/footer',
</span><span class="cx" style="display: block; padding: 0 10px">        array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // The $attributes argument cannot be removed despite not being used in this function,
-               // because otherwise it won't be available in render.php.
-               // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
-               'render_callback' => function ( array $attributes ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         'render_callback' => function () {
</ins><span class="cx" style="display: block; padding: 0 10px">                         ob_start();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        include_once __DIR__ . '/render.php';
-                       return do_blocks( ob_get_clean() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 require __DIR__ . '/render.php';
+                       return ob_get_clean();
</ins><span class="cx" style="display: block; padding: 0 10px">                 },
</span><span class="cx" style="display: block; padding: 0 10px">        )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksfooterrenderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/render.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/render.php  2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/footer/render.php    2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php namespace Wporg\TranslationEvents\Theme_2024; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        </div><?php // Close the main wp-block-group div, opened by the header block. ?>
-                       <!-- wp:wporg/global-footer /-->
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php echo do_blocks( '<!-- wp:wporg/global-footer /-->' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <?php wp_footer(); ?>
</span><span class="cx" style="display: block; padding: 0 10px">                </div><?php // Close the wp-site-blocks div, opened by the header block. ?>
</span><span class="cx" style="display: block; padding: 0 10px">        </body>
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blocksheaderrenderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/header/render.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/header/render.php  2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/header/render.php    2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,5 +18,3 @@
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="wp-site-blocks">
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php echo $site_header; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <div class="wp-block-group alignfull has-white-background-color has-background" style="padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:18px;padding-left:var(--wp--preset--spacing--edge-space)">
-                               <h2 class="wp-block-heading"><?php echo esc_html( $attributes['title'] ); ?></h2>
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024blockspageseventsmyeventsrenderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/pages/events/my-events/render.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/pages/events/my-events/render.php  2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/blocks/pages/events/my-events/render.php    2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,10 +1,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> namespace Wporg\TranslationEvents\Theme_2024;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-use Wporg\TranslationEvents\Event\Events_Query_Result;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$event_ids = $attributes['event_ids'] ?? array();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/** @var Events_Query_Result $events */
-$events = $attributes['events'] ?? array();
</del><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-<span>my-events</span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<!-- wp:wporg-translate-events-2024/event-list <?php echo wp_json_encode( array( 'event_ids' => $event_ids ) ); ?> /-->
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024functionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/functions.php     2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/functions.php       2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,8 +6,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> function register_blocks(): void {
</span><span class="cx" style="display: block; padding: 0 10px">        include_once __DIR__ . '/blocks/header/index.php';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        include_once __DIR__ . '/blocks/event-excerpt/index.php';
+       include_once __DIR__ . '/blocks/event-date/index.php';
+       include_once __DIR__ . '/blocks/event-template/index.php';
+       include_once __DIR__ . '/blocks/event-title/index.php';
+       include_once __DIR__ . '/blocks/event-list/index.php';
</ins><span class="cx" style="display: block; padding: 0 10px">         include_once __DIR__ . '/blocks/footer/index.php';
</span><span class="cx" style="display: block; padding: 0 10px">        include_once __DIR__ . '/blocks/pages/events/my-events/index.php';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        include_once __DIR__ . '/blocks/event-attendance-mode/index.php';
+       include_once __DIR__ . '/blocks/event-flag/index.php';
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> add_action(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,7 +28,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">        'wporg_translate_events_theme_init',
</span><span class="cx" style="display: block; padding: 0 10px">        function (): void {
</span><span class="cx" style="display: block; padding: 0 10px">                register_blocks();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 add_action(
</span><span class="cx" style="display: block; padding: 0 10px">                        'wp_head',
</span><span class="cx" style="display: block; padding: 0 10px">                        function (): void {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -146,15 +152,35 @@
</span><span class="cx" style="display: block; padding: 0 10px">        // are registered.
</span><span class="cx" style="display: block; padding: 0 10px">        ob_start();
</span><span class="cx" style="display: block; padding: 0 10px">        require $template_path;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $page_content = do_blocks( ob_get_clean() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $rendered_template = ob_get_clean();
+       $page_title        = esc_html( $title );
+       $page_content      = do_blocks(
+               <<<BLOCKS
+               <!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"0px"}},"className":"entry-content","layout":{"type":"constrained"}} -->
+               <main class="wp-block-group entry-content">
+                       <!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|20","left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","bottom":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
+                       <div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--edge-space)">
+                               <!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
+                               <div class="wp-block-group page-upcoming-title-past-wrapper">
+                                       <!-- wp:heading --><h2 class="wp-block-heading">$page_title</h2><!-- /wp:heading -->
+                               </div>
+                               <!-- /wp:group -->
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                <!-- wp:group {"layout":{"type":"inherit","flexWrap":"nowrap","justifyContent":"space-between"}} -->
+                               <div class="wp-block-group">$rendered_template</div>
+                               <!-- /wp:group -->
+                       </div>
+                       <!-- /wp:group -->
+               </main>
+               <!-- /wp:group -->
+               BLOCKS
+       );
+
</ins><span class="cx" style="display: block; padding: 0 10px">         $header_json = wp_json_encode( array( 'title' => $title ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-       // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
-       echo do_blocks(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo do_blocks( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
</ins><span class="cx" style="display: block; padding: 0 10px">                 <<<BLOCKS
</span><span class="cx" style="display: block; padding: 0 10px">                <!-- wp:wporg-translate-events-2024/header $header_json /-->
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $page_content
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $page_content
</ins><span class="cx" style="display: block; padding: 0 10px">                 <!-- wp:wporg-translate-events-2024/footer /-->
</span><span class="cx" style="display: block; padding: 0 10px">                BLOCKS
</span><span class="cx" style="display: block; padding: 0 10px">        );
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventsthemeswporgtranslateevents2024stylecss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/style.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/style.css 2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/themes/wporg-translate-events-2024/style.css   2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,3 +9,153 @@
</span><span class="cx" style="display: block; padding: 0 10px"> License URI: http://www.gnu.org/licenses/gpl-2.0.html
</span><span class="cx" style="display: block; padding: 0 10px"> Text Domain: wporg-translate-events-2024
</span><span class="cx" style="display: block; padding: 0 10px"> Template: wporg-parent-2021
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+*/
+
+/*
+ * Layout
+ */
+body {
+       --wp--custom--layout--wide-size: 1600px;
+}
+.wp-site-blocks .is-layout-constrained,
+.wp-block-post-content-is-layout-constrained {
+       & .alignwide {
+               max-width: var(--wp--custom--layout--wide-size) !important;
+       }
+}
+.wporg-marker-list__container {
+       padding-left: 0;
+}
+
+.wporg-marker-list__container .wporg-marker-list-item {
+               border: 1px solid var(--wp--preset--color--light-grey-1);
+               border-bottom: none;
+               padding: var(--wp--preset--spacing--20);
+               list-style: none;
+               font-size: var(--wp--preset--font-size--small);
+       }
+       
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__title {
+       float: left;
+}
+
+ .wporg-marker-list__container .wporg-marker-list-item:first-child {
+                       border-radius: 2px 2px 0 0;
+               }
+
+.wporg-marker-list__container .wporg-marker-list-item:last-child {
+                       border-radius: 0 0 2px 2px;
+                       border-bottom: 1px solid var(--wp--preset--color--light-grey-1);
+               }
+
+.wporg-marker-list__container span.my-event-flag {
+    width: 43px;
+    height: 28px;
+    padding: 4px 8px;
+    gap: 10px;
+    border-radius: 2px 0 0 0;
+    background: #EFF2FF;
+    margin-left: 4px; 
+    font-size: .8em; 
+}
+
+ @media (min-width: 960px) {
+
+.wporg-marker-list__container .wporg-marker-list-item {
+                       display: grid;
+                       align-items: start;
+                       gap: var(--wp--preset--spacing--20);
+                       grid-template-columns: 45% 1fr 2fr;
+       }
+               }
+
+@media (min-width: 1080px) {
+
+.wporg-marker-list__container .wporg-marker-list-item {
+                       font-size: var(--wp--preset--font-size--normal);
+       }
+               }
+
+@media (min-width: 1280px) {
+
+.wporg-marker-list__container .wporg-marker-list-item {
+                       grid-template-columns: 60% 1fr 1fr;
+       }
+               }
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__title {
+                       margin: 0;
+                       font-family: var(--wp--preset--font-family--inter);
+                       font-size: var(--wp--preset--font-size--small);
+                       line-height: var(--wp--custom--body--typography--line-height);
+                       --wp--preset--spacing--30: 0;
+               }
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__title a {
+                               -webkit-text-decoration: none;
+                               text-decoration: none;
+                       }
+
+@media (min-width: 1080px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__title {
+                               font-size: var(--wp--preset--font-size--normal);
+               }
+                       }
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__attendance-mode::first-letter {
+                           text-transform: capitalize;
+                       }
+
+@media (max-width: 781px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__attendance-mode {
+                               margin-top: 2px;
+                               margin-bottom: -2px;
+               }
+                       }
+
+@media (min-width: 600px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__attendance-mode {
+                               display: inline;
+               }
+                       }
+
+@media (min-width: 600px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__date-time {
+                               display: inline-flex;
+                               justify-content: flex-end;
+                               white-space: nowrap;
+                               align-items: center;
+               }
+                       }
+
+@media (min-width: 1280px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__date-time {
+                               display: flex;
+               }
+                       }
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__attendance-mode::after,
+               .wporg-marker-list__container .wporg-marker-list-item .wporg-google-map__date::after {
+                       content: "";
+                       margin-top: -1px; /* vertical-middle doesn't subtract the size of the element */
+                       margin-left: 10px;
+                       margin-right: 10px;
+                       height: 3px;
+                       width: 3px;
+                       border-radius: 3px;
+                       background: var(--wp--preset--color--charcoal-5);
+                       display: inline-block;
+                       vertical-align: middle;
+               }
+
+@media (max-width: 599px),(min-width: 960px) {
+
+.wporg-marker-list__container .wporg-marker-list-item .wporg-marker-list-item__attendance-mode::after {
+                               display: none;
+               }
+                       }
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginswporggptranslationeventswporggptranslationeventsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/wporg-gp-translation-events.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/wporg-gp-translation-events.php      2024-08-28 03:49:05 UTC (rev 14003)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/wporg-gp-translation-events.php        2024-08-28 17:14:01 UTC (rev 14004)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * Plugin Name: Translation Events
</span><span class="cx" style="display: block; padding: 0 10px">  * Plugin URI: https://github.com/WordPress/wporg-gp-translation-events/
</span><span class="cx" style="display: block; padding: 0 10px">  * Description: A WordPress plugin for creating translation events.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Version: 1.0.0
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Version: 1.0.1
</ins><span class="cx" style="display: block; padding: 0 10px">  * Requires at least: 6.4
</span><span class="cx" style="display: block; padding: 0 10px">  * Tested up to: 6.4
</span><span class="cx" style="display: block; padding: 0 10px">  * Requires PHP: 7.4
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,6 +89,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'wp_enqueue_scripts', array( $this, 'register_translation_event_js' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'init', array( $this, 'register_event_post_type' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'init', array( $this, 'send_notifications' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                add_action( 'init', array( $this, 'remove_incorrect_rss_feed' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 add_action( 'add_meta_boxes', array( $this, 'event_meta_boxes' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'save_post', array( $this, 'save_event_meta_boxes' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'transition_post_status', array( $this, 'event_status_transition' ), 10, 3 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -128,6 +129,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                GP::$router->add( "/events/attend/$id", array( 'Wporg\TranslationEvents\Routes\User\Attend_Event_Route', 'handle' ), 'post' );
</span><span class="cx" style="display: block; padding: 0 10px">                GP::$router->add( "/events/host/$id/$id", array( 'Wporg\TranslationEvents\Routes\User\Host_Event_Route', 'handle' ), 'post' );
</span><span class="cx" style="display: block; padding: 0 10px">                GP::$router->add( '/events/my-events', array( 'Wporg\TranslationEvents\Routes\User\My_Events_Route', 'handle' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                GP::$router->add( '/events/feed', array( 'Wporg\TranslationEvents\Routes\Event\Rss_Route', 'handle' ) );
+               GP::$router->add( '/events/rss', array( 'Wporg\TranslationEvents\Routes\Event\Rss_Route', 'handle' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 GP::$router->add( "/events/$slug/translations/$locale/$status", array( 'Wporg\TranslationEvents\Routes\Event\Translations_Route', 'handle' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                GP::$router->add( "/events/$slug/translations/$locale", array( 'Wporg\TranslationEvents\Routes\Event\Translations_Route', 'handle' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                GP::$router->add( "/events/$slug", array( 'Wporg\TranslationEvents\Routes\Event\Details_Route', 'handle' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,6 +182,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $args = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'labels'       => $labels,
</span><span class="cx" style="display: block; padding: 0 10px">                        'public'       => true,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'show_in_rest' => true,
</ins><span class="cx" style="display: block; padding: 0 10px">                         'has_archive'  => true,
</span><span class="cx" style="display: block; padding: 0 10px">                        'hierarchical' => true,
</span><span class="cx" style="display: block; padding: 0 10px">                        'menu_icon'    => 'dashicons-calendar',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -430,6 +434,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * Remove the incorrect RSS feed.
+        */
+       public function remove_incorrect_rss_feed() {
+               remove_action( 'wp_head', 'feed_links', 2 );
+       }
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * Add the event meta keys to the list of meta keys to keep in post revisions.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array $keys The list of meta keys to keep in post revisions.
</span></span></pre>
</div>
</div>

</body>
</html>