Redirect back to attachment permalink page after editing attachment via 'Edit This' link.

git-svn-id: https://develop.svn.wordpress.org/trunk@7554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-27 22:05:51 +00:00
parent 8807f9041b
commit 6bda12dfad
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ function url_to_postid($url) {
$url = apply_filters('url_to_postid', $url);
// First, check to see if there is a 'p=N' or 'page_id=N' to match against
if ( preg_match('#[?&](p|page_id)=(\d+)#', $url, $values) ) {
if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) {
$id = absint($values[2]);
if ($id)
return $id;