Make WordPress Core


Ignore:
Timestamp:
10/14/2020 06:19:43 PM (4 years ago)
Author:
iandunn
Message:

Community Events: Display dates and times in the user's time zone.

Fixes #51130
Props sippis, hlashbrooke, audrasjb, Rarst, iandunn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-community-events.php

    r49145 r49146  
    7878     *
    7979     * @since 4.8.0
     80     * @since 5.6.0 Response no longer contains formatted date field. They're added
     81     *              in `wp.communityEvents.populateDynamicEventFields()` now.
    8082     *
    8183     * @param string $location_search Optional. City name to help determine the location.
     
    166168
    167169            $response_body['events'] = $this->trim_events( $response_body['events'] );
    168             $response_body = $this->format_event_data_time( $response_body );
    169170
    170171            return $response_body;
     
    345346     *
    346347     * @since 4.8.0
     348     * @since 5.6.0 Response no longer contains formatted date field. They're added
     349     *              in `wp.communityEvents.populateDynamicEventFields()` now.
    347350     *
    348351     * @return array|false An array containing `location` and `events` items
     
    356359        }
    357360
    358         return $this->format_event_data_time( $cached_response );
     361        return $cached_response;
    359362    }
    360363
     
    373376     */
    374377    protected function format_event_data_time( $response_body ) {
     378        _deprecated_function(
     379            __METHOD__,
     380            '5.6.0',
     381            'This is no longer used by Core, and only kept for backwards-compatibility.'
     382        );
     383
    375384        if ( isset( $response_body['events'] ) ) {
    376385            foreach ( $response_body['events'] as $key => $event ) {
Note: See TracChangeset for help on using the changeset viewer.