Changeset 25472
- Timestamp:
- 09/17/2013 09:07:12 AM (11 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/deprecated.php
r25307 r25472 113 113 * @deprecated 2.9.0 114 114 * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory. 115 * 115 * 116 116 * @param string $file Filesystem path relative to the wp-content directory. 117 117 * @return string Full filesystem path to edit. … … 1052 1052 */ 1053 1053 function wp_nav_menu_locations_meta_box() { 1054 _deprecated_function( __FUNCTION__, '3.6' ); 1054 _deprecated_function( __FUNCTION__, '3.6' ); 1055 1055 } 1056 1056 … … 1117 1117 return $upgrader->upgrade($theme); 1118 1118 } 1119 1120 /** 1121 * This was once used to display attachment links. Now it is deprecated and stubbed. 1122 * 1123 * {@internal Missing Short Description}} 1124 * 1125 * @since 2.0.0 1126 * @deprecated 3.7.0 1127 * 1128 * @param unknown_type $id 1129 * @return unknown 1130 */ 1131 function the_attachment_links( $id = false ) { 1132 _deprecated_function( __FUNCTION__, '3.7' ); 1133 } -
trunk/src/wp-admin/includes/template.php
r25240 r25472 694 694 return false; 695 695 } 696 }697 698 /**699 * {@internal Missing Short Description}}700 *701 * @since 2.0.0702 *703 * @param unknown_type $id704 * @return unknown705 */706 function the_attachment_links( $id = false ) {707 $id = (int) $id;708 $post = get_post( $id );709 710 if ( $post->post_type != 'attachment' )711 return false;712 713 $icon = wp_get_attachment_image( $post->ID, 'thumbnail', true );714 $attachment_data = wp_get_attachment_metadata( $id );715 $thumb = isset( $attachment_data['thumb'] );716 ?>717 <form id="the-attachment-links">718 <table>719 <col />720 <col class="widefat" />721 <tr>722 <th scope="row"><?php _e( 'URL' ) ?></th>723 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><?php echo esc_textarea( wp_get_attachment_url() ); ?></textarea></td>724 </tr>725 <?php if ( $icon ) : ?>726 <tr>727 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to file' ) : _e( 'Image linked to file' ); ?></th>728 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>"><?php echo $icon ?></a></textarea></td>729 </tr>730 <tr>731 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th>732 <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>733 </tr>734 <?php else : ?>735 <tr>736 <th scope="row"><?php _e( 'Link to file' ) ?></th>737 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo wp_get_attachment_url(); ?>" class="attachmentlink"><?php echo basename( wp_get_attachment_url() ); ?></a></textarea></td>738 </tr>739 <tr>740 <th scope="row"><?php _e( 'Link to page' ) ?></th>741 <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>742 </tr>743 <?php endif; ?>744 </table>745 </form>746 <?php747 696 } 748 697
Note: See TracChangeset
for help on using the changeset viewer.