diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-10-09 11:39:17 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-10-09 11:39:17 +0000 |
commit | 75e0ccc3a64e164d036da4f71f458520ddea3b24 (patch) | |
tree | 94f00db692e25c95030f7984c27178e1bd7e1bcd /wp-admin/admin-functions.php | |
parent | ca036ad95fc44c318275ab539a52f1eb6fddf060 (diff) | |
download | wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.gz wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.xz wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.zip |
WP Merge - needs testing.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@797 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/admin-functions.php')
-rw-r--r-- | wp-admin/admin-functions.php | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 7eef22d..64cbb1c 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1984,27 +1984,35 @@ function the_attachment_links($id = false) { return false; $icon = get_attachment_icon($post->ID); - + $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); + $thumb = isset($attachment_data['thumb']); ?> <form id="the-attachment-links"> <table> + <col /> + <col class="widefat" /> <tr> - <th scope="row"><?php _e('Text linked to file') ?></th> - <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid) ?></a></textarea></td> - </tr> - <tr> - <th scope="row"><?php _e('Text linked to subpost') ?></th> - <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 $post->post_title ?></a></textarea></td> + <th scope="row"><?php _e('URL') ?></th> + <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><?php echo $post->guid ?></textarea></td> </tr> <?php if ( $icon ) : ?> <tr> - <th scope="row"><?php _e('Thumbnail linked to file') ?></th> - <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo $icon ?></a></textarea></td> + <th scope="row"><?php $thumb ? _e('Thumbnail linked to file') : _e('Image linked to file'); ?></th> + <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> </tr> <tr> - <th scope="row"><?php _e('Thumbnail linked to subpost') ?></th> + <th scope="row"><?php $thumb ? _e('Thumbnail linked to page') : _e('Image linked to file'); ?></th> <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> </tr> +<?php else : ?> + <tr> + <th scope="row"><?php _e('Link to file') ?></th> + <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid); ?></a></textarea></td> + </tr> + <tr> + <th scope="row"><?php _e('Link to page') ?></th> + <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> + </tr> <?php endif; ?> </table> </form> |