mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Date/Time: Introduce current_datetime() for better time operations.
Returning a `DateTimeImmutable` representation of the current moment in time, this allows for a more flexible and reliable use than `current_time()` provides. Props Rarst. Fixes #47464. git-svn-id: https://develop.svn.wordpress.org/trunk@45883 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -860,7 +860,7 @@ function wp_dashboard_recent_posts( $args ) {
|
||||
echo '<ul>';
|
||||
|
||||
$today = current_time( 'Y-m-d' );
|
||||
$tomorrow = gmdate( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ) );
|
||||
$tomorrow = current_datetime()->modify( '+1 day' )->format( 'Y-m-d' );
|
||||
$year = current_time( 'Y' );
|
||||
|
||||
while ( $posts->have_posts() ) {
|
||||
|
||||
Reference in New Issue
Block a user