Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events: Update templates to use Map block directly #1110

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace WordPressdotorg\Events_2023;
use WP, WP_Post, DateTimeZone, DateTime;
use WordPressdotorg\MU_Plugins\Google_Map_Event_Filters;
use WordPressdotorg\MU_Plugins\Google_Map;

defined( 'WPINC' ) || die();

Expand Down Expand Up @@ -95,7 +95,7 @@ function prime_query_cache(): void {
'landing_page' => $request_uri
);

$cache_key = Google_Map_Event_Filters\get_cache_key( $parts );
$cache_key = Google_Map\get_cache_key( $parts );
$events = get_city_landing_page_events( $request_uri, true );

set_transient( $cache_key, $events, DAY_IN_SECONDS );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ <h1 class="wp-block-heading">Meet the community behind WordPress</h1>
</div>
<!-- /wp:group -->

<!-- wp:wporg/google-map-event-filters {"style":{"layout":{"selfStretch":"fixed","flexSize":"50%"}},"filterSlug":"all-upcoming","googleMapBlockAttributes":{"id":"all-upcoming-map","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY","showList":false,"showSearch":false}} /-->
<!-- wp:wporg/google-map {"style":{"layout":{"selfStretch":"fixed","flexSize":"50%"}},"filterSlug":"all-upcoming","id":"all-upcoming-map","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY","showList":false,"showSearch":false} /-->
</div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h2 class="wp-block-heading has-medium-font-size" style="font-style:normal;font-weight:700">Upcoming Events</h2>
<!-- /wp:heading -->

<!-- wp:wporg/google-map-event-filters {"filterSlug":"all-upcoming","googleMapBlockAttributes":{"id":"all-upcoming-list","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY","showMap":false}} /-->
<!-- wp:wporg/google-map {"filterSlug":"all-upcoming","id":"all-upcoming-list","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY","showMap":false} /-->

<!-- wp:buttons {"style":{"spacing":{"margin":{"top":"var:preset|spacing|40"}}}} -->
<div class="wp-block-buttons" style="margin-top:var(--wp--preset--spacing--40)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- wp:group {"tagName":"main","className":"entry-content"} -->
<main class="wp-block-group entry-content">
<!-- wp:wporg/google-map-event-filters {"filterSlug":"city-landing-pages","googleMapBlockAttributes":{"id":"city-landing-page","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY"}} /-->
<!-- wp:wporg/google-map {"filterSlug":"city-landing-pages","id":"city-landing-page","apiKey":"WORDCAMP_DEV_GOOGLE_MAPS_API_KEY"} /-->
</main>
<!-- /wp:group -->

Expand Down
Loading