Drop leading / by retrieving the inner subpattern when matching attachment endpoints.

Fixes #22619


git-svn-id: https://develop.svn.wordpress.org/trunk@24809 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2013-07-28 19:02:08 +00:00
parent a238a10d73
commit 7b0a5e5240
1 changed files with 2 additions and 2 deletions

View File

@ -1435,8 +1435,8 @@ class WP_Rewrite {
if ( !empty($endpoints) ) {
foreach ( (array) $ep_query_append as $regex => $ep ) {
if ( $ep[0] & EP_ATTACHMENT ) {
$rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(2);
$rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(2);
$rewrite[$sub1 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
$rewrite[$sub2 . $regex] = $subquery . $ep[1] . $this->preg_index(3);
}
}
}