Changeset 13857
- Timestamp:
- 06/25/2024 10:52:51 AM (20 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events
- Files:
-
- 1 added
- 6 edited
-
includes/event/event-form-handler.php (modified) (2 diffs)
-
templates/home.php (modified) (1 diff)
-
templates/new-design/parts/footer.php (modified) (1 diff)
-
templates/new-design/parts/header.php (modified) (1 diff)
-
templates/new-design/parts/site-header.php (added)
-
templates/parts/header.php (modified) (1 diff)
-
wporg-gp-translation-events.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-form-handler.php
r13753 r13857 4 4 5 5 use DateTime; 6 use DateTimeImmutable; 6 7 use DateTimeZone; 7 8 use Exception; … … 15 16 private Notifications_Schedule $notifications_schedule; 16 17 17 public function __construct( Event_Repository_Interface $event_repository ) {18 public function __construct( DateTimeImmutable $now, Event_Repository_Interface $event_repository ) { 18 19 $this->event_repository = $event_repository; 19 $this->notifications_schedule = new Notifications_Schedule( $ this->event_repository );20 $this->notifications_schedule = new Notifications_Schedule( $now, $this->event_repository ); 20 21 } 21 22 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/home.php
r13822 r13857 22 22 23 23 <div class="event-page-wrapper"> 24 <div class="notice" style="padding: .5rem">25 <?php26 echo wp_kses(27 sprintf(28 // translators: %s is a link to a page about hosting events.29 __( 'Do you want to host your own event? <a href="%s">Find more information here</a>.', 'gp-translation-events' ),30 'https://make.wordpress.org/polyglots/2024/05/29/translation-events-inviting-gtes-to-create-and-manage-events/'31 ),32 array( 'a' => array( 'href' => array() ) )33 );34 ?>35 </div>36 24 <div class="event-left-col"> 37 25 <?php -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/new-design/parts/footer.php
r13801 r13857 1 1 <?php 2 namespace Wporg\TranslationEvents\Templates\NewDesign\Parts; 2 3 3 echo 'footer<br>'; 4 // TODO. 4 ?> 5 6 <div class="clear"></div> 7 <?php gp_tmpl_footer(); ?> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/new-design/parts/header.php
r13801 r13857 1 1 <?php 2 namespace Wporg\TranslationEvents\Templates\NewDesign\Parts; 2 3 3 echo 'header<br>'; 4 // TODO. 4 use Wporg\TranslationEvents\Templates; 5 use Wporg\TranslationEvents\Urls; 6 7 /** @var string $html_title */ 8 /** @var string|callable $page_title */ 9 /** @var string $url */ 10 /** @var string $image_url */ 11 /** @var string $html_description */ 12 /** @var ?callable $sub_head */ 13 /** @var ?string[] $breadcrumbs */ 14 15 $html_title = $html_title ?? esc_html__( 'Translation Events', 'gp-translation-events' ); 16 $url = $url ?? Urls::events_home(); 17 $html_description = $html_description ?? esc_html__( 'WordPress Translation Events', 'gp-translation-events' ); 18 $image_url = $image_url ?? Urls::event_default_image(); 19 20 gp_title( $html_title ); 21 Templates::part( 'site-header', get_defined_vars() ); 22 Templates::part( 'breadcrumbs', array( 'extra_items' => $breadcrumbs ?? array() ) ); 23 24 ?> 25 26 <div class="event-list-top-bar"> 27 <h2 class="event-page-title"> 28 <?php if ( is_callable( $page_title ) ) : ?> 29 <?php $page_title(); ?> 30 <?php else : ?> 31 <?php echo esc_html( $page_title ); ?> 32 <?php endif; ?> 33 </h2> 34 35 <ul class="event-list-nav"> 36 <?php if ( is_user_logged_in() ) : ?> 37 <?php if ( current_user_can( 'manage_translation_events' ) ) : ?> 38 <li><a href="<?php echo esc_url( Urls::events_trashed() ); ?>">Deleted Events</a></li> 39 <?php endif; ?> 40 <li><a href="<?php echo esc_url( Urls::my_events() ); ?>">My Events</a></li> 41 <?php if ( current_user_can( 'create_translation_event' ) ) : ?> 42 <li><a class="button is-primary" href="<?php echo esc_url( Urls::event_create() ); ?>">Create Event</a></li> 43 <?php endif; ?> 44 <?php endif; ?> 45 </ul> 46 47 <?php if ( isset( $sub_head ) && is_callable( $sub_head ) ) : ?> 48 <p class="event-sub-head"> 49 <?php $sub_head(); ?> 50 </p> 51 <?php endif; ?> 52 </div> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/templates/parts/header.php
r13801 r13857 18 18 $image_url = $image_url ?? Urls::event_default_image(); 19 19 20 // to-do: this action should be deleted when the new design is implemented, because it is in the "site-header" template. 20 21 add_action( 21 22 'gp_head', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/wporg-gp-translation-events.php
r13800 r13857 260 260 */ 261 261 public function submit_event_ajax() { 262 $form_handler = new Event_Form_Handler( self:: get_event_repository(), self::get_attendee_repository() );262 $form_handler = new Event_Form_Handler( self::now(), self::get_event_repository() ); 263 263 // Nonce verification is done by the form handler. 264 264 // phpcs:ignore WordPress.Security.NonceVerification.Missing
Note: See TracChangeset
for help on using the changeset viewer.