Twenty Twenty: Replace `wp_date()` with `date_i18n()`.
Since WordPress 5.3 it is recommended to use `wp_date()` instead of `date_i18n()`. This changeset replaces the function in Twenty Twenty, with a fallback to `date_i18n()` for old versions of WordPress. For more info, see https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/. Props sachyya-sachet, joyously, sabernhardt, poena. Fixes #48589. Built from https://develop.svn.wordpress.org/trunk@57301 git-svn-id: http://core.svn.wordpress.org/trunk@56807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1866ae2cb3
commit
79e39943a5
|
@ -20,10 +20,13 @@
|
|||
|
||||
<p class="footer-copyright">©
|
||||
<?php
|
||||
echo date_i18n(
|
||||
/* translators: Copyright date format, see https://www.php.net/manual/datetime.format.php */
|
||||
_x( 'Y', 'copyright date format', 'twentytwenty' )
|
||||
);
|
||||
$date_format = _x( 'Y', 'copyright date format', 'twentytwenty' );
|
||||
if ( function_exists( 'wp_date' ) ) {
|
||||
echo wp_date( $date_format );
|
||||
} else {
|
||||
echo date_i18n( $date_format );
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
|
||||
</p><!-- .footer-copyright -->
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57300';
|
||||
$wp_version = '6.5-alpha-57301';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue