Fix attachment rewrite endpoints. Props Curioso. fixes #5553
git-svn-id: https://develop.svn.wordpress.org/trunk@12271 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
64200ba296
commit
dff67e2fa2
|
@ -1444,10 +1444,10 @@ class WP_Rewrite {
|
||||||
$subcommentquery = $subquery . '&cpage=' . $this->preg_index(2);
|
$subcommentquery = $subquery . '&cpage=' . $this->preg_index(2);
|
||||||
|
|
||||||
//do endpoints for attachments
|
//do endpoints for attachments
|
||||||
if ( !empty($endpoint) ) { foreach ( (array) $ep_query_append as $regex => $ep ) {
|
if ( !empty($endpoints) ) { foreach ( (array) $ep_query_append as $regex => $ep ) {
|
||||||
if ($ep[0] & EP_ATTACHMENT) {
|
if ($ep[0] & EP_ATTACHMENT) {
|
||||||
$rewrite[$sub1 . $regex] = $subquery . '?' . $ep[1] . $this->preg_index(2);
|
$rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(2);
|
||||||
$rewrite[$sub2 . $regex] = $subquery . '?' . $ep[1] . $this->preg_index(2);
|
$rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(2);
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue