From 7328d561b134bfdfbf751d98fcb94eeeca83db28 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Fri, 12 May 2017 15:53:46 +0000 Subject: [PATCH] Dashboard: Persist location for community events Fixes a bug where cached events & location data was not accessible because the cache key could not be regenerated without latitude and longitude information. Discovered and fixed during #wcber contributor day. Props soean, kubik-rubik, obenland. See #40702. Built from https://develop.svn.wordpress.org/trunk@40651 git-svn-id: http://core.svn.wordpress.org/trunk@40514 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 3 --- wp-admin/includes/dashboard.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 029e20e62b..a2e829bf65 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -319,9 +319,6 @@ function wp_ajax_get_community_events() { ) ); } else { if ( isset( $events['location'] ) ) { - // Send only the data that the client will use. - $events['location'] = $events['location']['description']; - // Store the location network-wide, so the user doesn't have to set it on each site. update_user_option( $user_id, 'community-events-location', $events['location'], true ); } diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index b25426e753..0f0058127f 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1243,7 +1243,7 @@ function wp_print_community_events_templates() { {{ data.location }}' + '{{ data.location.description }}' ); ?> @@ -1280,7 +1280,7 @@ function wp_print_community_events_templates() { organize one?' ), - '{{data.location}}', + '{{ data.location.description }}', __( 'https://make.wordpress.org/community/handbook/meetup-organizer/welcome/' ) ); ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index fcfc493351..da6f342547 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40650'; +$wp_version = '4.8-alpha-40651'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.