[wp-trac] [WordPress Trac] #35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
WordPress Trac
noreply at wordpress.org
Thu Dec 24 02:15:57 UTC 2015
#35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
-------------------------------------------------+-------------------------
Reporter: douglsmith | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4.1
Component: Query | Version: 4.4
Severity: critical | Resolution:
Keywords: has-patch needs-unit-tests needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Comment (by jobst):
@pento suggestion for the function wp_old_slug_redirect() while you are
changing it:
Currently on the second line of the function the code is:
{{{
if ( '' !== $wp_query->query_vars['name'] ) :
}}}
which is then closed just before function end 80 lines further down.
To be in line with the other lines of code for that function wouldn't it
be better to write that as:
{{{
if ( '' === $wp_query->query_vars['name'] ) {
return;
}
}}}
It would be more readable as well and you do not need to scroll down 80
lines to see what happens afterwards.
Just a thought.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35031#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list