Ticket #23091: 23091.2.diff
| File 23091.2.diff, 1009 bytes (added by SergeyBiryukov, 5 months ago) |
|---|
-
wp-admin/includes/post.php
742 742 if ( !strpos($content, '?attachment_id=') || !preg_match_all( '/<a ([^>]+)>[\s\S]+?<\/a>/', $content, $link_matches ) ) 743 743 return; 744 744 745 $ site_url = get_bloginfo('url');746 $ site_url = substr( $site_url, (int) strpos($site_url, '://') ); // remove the http(s)745 $home_url = home_url(); 746 $home_url = substr( $home_url, (int) strpos( $home_url, '://' ) ); // remove the http(s) 747 747 $replace = ''; 748 748 749 749 foreach ( $link_matches[1] as $key => $value ) { … … 756 756 $url_id = (int) $url_match[2]; 757 757 $rel_id = (int) $rel_match[1]; 758 758 759 if ( !$url_id || !$rel_id || $url_id != $rel_id || strpos( $url_match[0], $site_url) === false )759 if ( !$url_id || !$rel_id || $url_id != $rel_id || strpos( $url_match[0], $home_url ) === false ) 760 760 continue; 761 761 762 762 $link = $link_matches[0][$key];