From 9bdaa48e3e89b3ea4786388cfd88404b1dae50c5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 25 Feb 2014 17:09:09 +0000 Subject: [PATCH] Remove _relocate_children(), which has had no purpose for some time. props SergeyBiryukov, scribu. fixes #19367. git-svn-id: https://develop.svn.wordpress.org/trunk@27261 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/deprecated.php | 14 ++++++++++++++ src/wp-admin/includes/post.php | 27 --------------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index 2edbc6f4f0..36b4ca28ca 100644 --- a/src/wp-admin/includes/deprecated.php +++ b/src/wp-admin/includes/deprecated.php @@ -1174,3 +1174,17 @@ function wp_dashboard_recent_comments_control() {} function wp_dashboard_secondary() {} function wp_dashboard_secondary_control() {} /**#@-*/ + +/** + * This was once used to move child posts to a new parent. + * + * @since 2.3.0 + * @deprecated 3.9.0 + * @access private + * + * @param int $old_ID + * @param int $new_ID + */ +function _relocate_children( $old_ID, $new_ID ) { + _deprecated_function( __FUNCTION__, '3.9' ); +} diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index b39d87578e..98d32d3150 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -807,33 +807,6 @@ function _fix_attachment_links( $post ) { } } -/** - * Move child posts to a new parent. - * - * @since 2.3.0 - * @access private - * - * @param unknown_type $old_ID - * @param unknown_type $new_ID - * @return unknown - */ -function _relocate_children( $old_ID, $new_ID ) { - global $wpdb; - $old_ID = (int) $old_ID; - $new_ID = (int) $new_ID; - - $children = $wpdb->get_col( $wpdb->prepare(" - SELECT post_id - FROM $wpdb->postmeta - WHERE meta_key = '_wp_attachment_temp_parent' - AND meta_value = %d", $old_ID) ); - - foreach ( $children as $child_id ) { - $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('ID' => $child_id) ); - delete_post_meta($child_id, '_wp_attachment_temp_parent'); - } -} - /** * Get all the possible statuses for a post_type *