WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/28/2019 12:51:16 AM (7 weeks ago)
Author:
SergeyBiryukov
Message:

Date/Time: Introduce wp_date() to retrieve the date in localized format.

Convert date_i18n() into a wrapper for wp_date().

wp_date() is intended as a replacement for date_i18n() without legacy quirks in it. It accepts a true Unix timestamp (not summed with timezone offset) and an arbitrary timezone.

Props Rarst, mboynes, MikeHansenMe, rmccue, nacin.
Fixes #28636.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r45507 r45901  
    209209add_filter( 'widget_text_content', 'shortcode_unautop' );
    210210add_filter( 'widget_text_content', 'do_shortcode', 11 ); // Runs after wpautop(); note that $post global will be null when shortcodes run.
    211 
    212 add_filter( 'date_i18n', 'wp_maybe_decline_date' );
    213211
    214212// RSS filters
Note: See TracChangeset for help on using the changeset viewer.