Opened 12 years ago
Closed 12 years ago
#27181 closed enhancement (fixed)
get_the_date() - useless var and concatenation
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.9 | Priority: | low |
| Severity: | trivial | Version: | 3.0 |
| Component: | Date/Time | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description (last modified by )
Hello
Function get_the_date():
function get_the_date( $d = '' ) {
$post = get_post();
$the_date = '';
if ( '' == $d )
$the_date .= mysql2date(get_option('date_format'), $post->post_date);
else
$the_date .= mysql2date($d, $post->post_date);
return apply_filters('get_the_date', $the_date, $d);
}
$the_date = ''; is useless.
So the 2 .= are useless too.
My 2 cents ;)
Attachments (4)
Change History (12)
#2
@
12 years ago
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 3.9
- Priority changed from normal to low
- Severity changed from normal to trivial
#4
@
12 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 27230:
#5
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Argh, I'm too slow today :-) I had a slightly different simplification, but that's ok.
We might however as well fix the inline docs of get_the_date() while working on it.
#6
@
12 years ago
27181.2.patch would change the $d value passed to the filter, but the docs fix looks good.
Note: See
TracTickets for help on using
tickets.
Thank you Sergey!