WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/2018 11:10:01 PM (2 weeks ago)
Author:
johnbillion
Message:

Date/Time: Add support for the c and r shorthand formats in date_i18n().

Props Rarst, pbearne

Fixes #20973

File:
1 edited

Legend:

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

    r43406 r43434  
    107107     */
    108108    $req_format = $dateformatstring;
     109
     110    $dateformatstring = preg_replace( "/(?<!\\\\)c/", DATE_W3C, $dateformatstring );
     111    $dateformatstring = preg_replace( "/(?<!\\\\)r/", DATE_RFC2822, $dateformatstring );
    109112
    110113    if ( ( ! empty( $wp_locale->month ) ) && ( ! empty( $wp_locale->weekday ) ) ) {
Note: See TracChangeset for help on using the changeset viewer.