From 14db24911fbcce5ed1cab3f5ce67047c9f225d28 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Sep 2013 09:08:08 +0000 Subject: [PATCH] Deprecate the_attachment_links(), unused since [6910]. props vinod dalvi. fixes #25340. Built from https://develop.svn.wordpress.org/trunk@25472 git-svn-id: http://core.svn.wordpress.org/trunk@25393 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/deprecated.php | 19 ++++++++++-- wp-admin/includes/template.php | 51 -------------------------------- 2 files changed, 17 insertions(+), 53 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index b912d7d5cf..3d933663a9 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -112,7 +112,7 @@ function dropdown_link_categories( $default = 0 ) { * @since 1.5.0 * @deprecated 2.9.0 * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory. - * + * * @param string $file Filesystem path relative to the wp-content directory. * @return string Full filesystem path to edit. */ @@ -1051,7 +1051,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { * @deprecated 3.6.0 */ function wp_nav_menu_locations_meta_box() { - _deprecated_function( __FUNCTION__, '3.6' ); + _deprecated_function( __FUNCTION__, '3.6' ); } /** @@ -1116,3 +1116,18 @@ function wp_update_theme($theme, $feedback = '') { $upgrader = new Theme_Upgrader(); return $upgrader->upgrade($theme); } + +/** + * This was once used to display attachment links. Now it is deprecated and stubbed. + * + * {@internal Missing Short Description}} + * + * @since 2.0.0 + * @deprecated 3.7.0 + * + * @param unknown_type $id + * @return unknown + */ +function the_attachment_links( $id = false ) { + _deprecated_function( __FUNCTION__, '3.7' ); +} diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9bb36cc6e6..a46e294379 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -695,57 +695,6 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) { } } -/** - * {@internal Missing Short Description}} - * - * @since 2.0.0 - * - * @param unknown_type $id - * @return unknown - */ -function the_attachment_links( $id = false ) { - $id = (int) $id; - $post = get_post( $id ); - - if ( $post->post_type != 'attachment' ) - return false; - - $icon = wp_get_attachment_image( $post->ID, 'thumbnail', true ); - $attachment_data = wp_get_attachment_metadata( $id ); - $thumb = isset( $attachment_data['thumb'] ); -?> - - html elements for role selectors *