Changeset 2611
- Timestamp:
- 05/18/2005 02:27:43 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2610 r2611 173 173 // examine a url (supposedly from this blog) and try to 174 174 // determine the post ID it represents. 175 function url_to_postid($url = '') {175 function url_to_postid($url) { 176 176 global $wp_rewrite; 177 177 … … 188 188 189 189 $req_uri = $url; 190 $home_path = parse_url(get_settings('home')); 191 $home_path = $home_path['path']; 192 193 $req_uri = str_replace(get_settings('home'), '', $req_uri); 194 $req_uri = str_replace($home_path, '', $req_uri); 190 191 if ( false !== strpos($req_uri, get_settings('home')) ) { 192 $req_uri = str_replace(get_settings('home'), '', $req_uri); 193 } else { 194 $home_path = parse_url(get_settings('home')); 195 $home_path = $home_path['path']; 196 $req_uri = str_replace($home_path, '', $req_uri); 197 } 198 195 199 $req_uri = trim($req_uri, '/'); 196 200 $request = $req_uri;
Note: See TracChangeset
for help on using the changeset viewer.