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

Fixes #22619


git-svn-id: http://core.svn.wordpress.org/trunk@24809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jon Cave 2013-07-28 19:02:08 +00:00
parent 70491482c6
commit dffea4e020

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);
}
}
}