Ticket #3757: 3757.diff
File 3757.diff, 766 bytes (added by , 18 years ago) |
---|
-
admin-functions.php
139 139 140 140 $post = & get_post( $post_ID, ARRAY_A ); 141 141 142 $search = "#<a[^>]+rel=('|\" 142 $search = "#<a[^>]+rel=('|\")[^'\"]*attachment[^>]*>#ie"; 143 143 144 144 // See if we have any rel="attachment" links 145 145 if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) ) 146 146 return; 147 147 148 148 $i = 0; 149 $search = "#[\s]+rel=(\"|' )(.*? )wp-att-(\d+)\\1#i";149 $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i"; 150 150 foreach ( $anchor_matches[0] as $anchor ) { 151 151 if ( 0 == preg_match( $search, $anchor, $id_matches ) ) 152 152 continue;