Ticket #3261: 3261.diff
File 3261.diff, 3.3 KB (added by , 17 years ago) |
---|
-
wp-admin/admin-functions.php
122 122 return; 123 123 124 124 $i = 0; 125 $search = "# id=(\"|')p(\d+)\\1#i";125 $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i"; 126 126 foreach ( $anchor_matches[0] as $anchor ) { 127 127 if ( 0 == preg_match($search, $anchor, $id_matches) ) 128 128 continue; 129 129 130 $id = $id_matches[ 2];130 $id = $id_matches[3]; 131 131 132 132 // While we have the attachment ID, let's adopt any orphans. 133 133 $attachment = & get_post($id, ARRAY_A); … … 2007 2007 <?php if ( $icon ) : ?> 2008 2008 <tr> 2009 2009 <th scope="row"><?php $thumb ? _e('Thumbnail linked to file') : _e('Image linked to file'); ?></th> 2010 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid; ?>" id="<?php echo $post->ID ?>"><?php echo $icon ?></a></textarea></td>2010 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid; ?>"><?php echo $icon ?></a></textarea></td> 2011 2011 </tr> 2012 2012 <tr> 2013 2013 <th scope="row"><?php $thumb ? _e('Thumbnail linked to page') : _e('Image linked to file'); ?></th> 2014 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment " id="<?php echo $post->ID?>"><?php echo $icon ?></a></textarea></td>2014 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td> 2015 2015 </tr> 2016 2016 <?php else : ?> 2017 2017 <tr> … … 2020 2020 </tr> 2021 2021 <tr> 2022 2022 <th scope="row"><?php _e('Link to page') ?></th> 2023 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment " id="<?php echo $post->ID ?>"><?php the_title(); ?></a></textarea></td>2023 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment wp-att-<?php echo $post->ID ?>"><?php the_title(); ?></a></textarea></td> 2024 2024 </tr> 2025 2025 <?php endif; ?> 2026 2026 </table> … … 2120 2120 return $image; 2121 2121 } 2122 2122 2123 ?> 2124 No newline at end of file 2123 ?> -
wp-admin/upload-js.php
221 221 display = 'full'; 222 222 223 223 if ( 'none' != link ) 224 h += "<a href='" + ( 'file' == link ? ( this.currentImage.srcBase + this.currentImage.src ) : ( this.currentImage.page + "' rel='attachment " ) ) + "' title='" + this.currentImage.title + "'>";224 h += "<a href='" + ( 'file' == link ? ( this.currentImage.srcBase + this.currentImage.src ) : ( this.currentImage.page + "' rel='attachment wp-att-" + this.currentImage.ID + "'" ) ) + "' title='" + this.currentImage.title + "'>"; 225 225 if ( display ) 226 226 h += "<img src='" + ( 'thumb' == display ? ( this.currentImage.thumbBase + this.currentImage.thumb ) : ( this.currentImage.srcBase + this.currentImage.src ) ) + "' alt='" + this.currentImage.title + "' />"; 227 227 else