mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Date/Time: Return early from the_weekday() and the_weekday_date() if we're not in the loop.
Restore `$previousweekday` global usage in `the_weekday_date()`, so it could still be used simultaneously with `the_date()`. Partially reverts [45378]. See #47354. git-svn-id: https://develop.svn.wordpress.org/trunk@45379 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -138,14 +138,14 @@ class Tests_Date_TheDate extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
ob_start();
|
||||
$GLOBALS['currentday'] = '18.09.15';
|
||||
$GLOBALS['previousday'] = '17.09.15';
|
||||
$GLOBALS['currentday'] = '18.09.15';
|
||||
$GLOBALS['previousweekday'] = '17.09.15';
|
||||
the_weekday_date();
|
||||
$this->assertEquals( 'Wednesday', ob_get_clean() );
|
||||
|
||||
ob_start();
|
||||
$GLOBALS['currentday'] = '18.09.15';
|
||||
$GLOBALS['previousday'] = '17.09.15';
|
||||
$GLOBALS['currentday'] = '18.09.15';
|
||||
$GLOBALS['previousweekday'] = '17.09.15';
|
||||
the_weekday_date( 'before ', ' after' );
|
||||
$this->assertEquals( 'before Wednesday after', ob_get_clean() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user