Commit 0aba71c5 authored by Sergey Biryukov's avatar Sergey Biryukov
Browse files

Remove unnecessary assignment and concatenation from the_date() and get_the_date().

props juliobox.
fixes #27181.
Built from https://develop.svn.wordpress.org/trunk@27230


git-svn-id: https://core.svn.wordpress.org/trunk@27087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 64192a1e
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -1403,11 +1403,9 @@ function the_date_xml() {
 */
function the_date( $d = '', $before = '', $after = '', $echo = true ) {
	global $currentday, $previousday;
	$the_date = '';

	if ( $currentday != $previousday ) {
		$the_date .= $before;
		$the_date .= get_the_date( $d );
		$the_date .= $after;
		$the_date = $before . get_the_date( $d ) . $after;
		$previousday = $currentday;

		$the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
@@ -1434,12 +1432,11 @@ function the_date( $d = '', $before = '', $after = '', $echo = true ) {
 */
function get_the_date( $d = '' ) {
	$post = get_post();
	$the_date = '';

	if ( '' == $d )
		$the_date .= mysql2date(get_option('date_format'), $post->post_date);
		$the_date = mysql2date( get_option( 'date_format' ), $post->post_date );
	else
		$the_date .= mysql2date($d, $post->post_date);
		$the_date = mysql2date( $d, $post->post_date );

	return apply_filters( 'get_the_date', $the_date, $d );
}