mirror of
git://develop.git.wordpress.org/
synced 2025-03-14 17:09:47 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57301 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a4500a1807
commit
bb1c19f3b7
@ -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' )
|
||||
);
|
||||
/* translators: Copyright date format, see https://www.php.net/manual/datetime.format.php */
|
||||
$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 -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user