More url_to_postid() fixes. http://mosquito.wordpress.org/view.php?id=1324
git-svn-id: http://svn.automattic.com/wordpress/trunk@2610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e11647a638
commit
a95277a8c5
|
@ -190,11 +190,7 @@ function url_to_postid($url = '') {
|
||||||
$home_path = parse_url(get_settings('home'));
|
$home_path = parse_url(get_settings('home'));
|
||||||
$home_path = $home_path['path'];
|
$home_path = $home_path['path'];
|
||||||
|
|
||||||
// Trim path info from the end and the leading home path from the
|
$req_uri = str_replace(get_settings('home'), '', $req_uri);
|
||||||
// front. For path info requests, this leaves us with the requesting
|
|
||||||
// filename, if any. For 404 requests, this leaves us with the
|
|
||||||
// requested permalink.
|
|
||||||
$req_uri = str_replace($pathinfo, '', $req_uri);
|
|
||||||
$req_uri = str_replace($home_path, '', $req_uri);
|
$req_uri = str_replace($home_path, '', $req_uri);
|
||||||
$req_uri = trim($req_uri, '/');
|
$req_uri = trim($req_uri, '/');
|
||||||
$request = $req_uri;
|
$request = $req_uri;
|
||||||
|
|
Loading…
Reference in New Issue