Skip to content

Commit 9bdaa48

Browse files
committed
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
1 parent 7d18f3b commit 9bdaa48

2 files changed

Lines changed: 14 additions & 27 deletions

File tree

src/wp-admin/includes/deprecated.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,3 +1174,17 @@ function wp_dashboard_recent_comments_control() {}
11741174
function wp_dashboard_secondary() {}
11751175
function wp_dashboard_secondary_control() {}
11761176
/**#@-*/
1177+
1178+
/**
1179+
* This was once used to move child posts to a new parent.
1180+
*
1181+
* @since 2.3.0
1182+
* @deprecated 3.9.0
1183+
* @access private
1184+
*
1185+
* @param int $old_ID
1186+
* @param int $new_ID
1187+
*/
1188+
function _relocate_children( $old_ID, $new_ID ) {
1189+
_deprecated_function( __FUNCTION__, '3.9' );
1190+
}

src/wp-admin/includes/post.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -807,33 +807,6 @@ function _fix_attachment_links( $post ) {
807807
}
808808
}
809809

810-
/**
811-
* Move child posts to a new parent.
812-
*
813-
* @since 2.3.0
814-
* @access private
815-
*
816-
* @param unknown_type $old_ID
817-
* @param unknown_type $new_ID
818-
* @return unknown
819-
*/
820-
function _relocate_children( $old_ID, $new_ID ) {
821-
global $wpdb;
822-
$old_ID = (int) $old_ID;
823-
$new_ID = (int) $new_ID;
824-
825-
$children = $wpdb->get_col( $wpdb->prepare("
826-
SELECT post_id
827-
FROM $wpdb->postmeta
828-
WHERE meta_key = '_wp_attachment_temp_parent'
829-
AND meta_value = %d", $old_ID) );
830-
831-
foreach ( $children as $child_id ) {
832-
$wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('ID' => $child_id) );
833-
delete_post_meta($child_id, '_wp_attachment_temp_parent');
834-
}
835-
}
836-
837810
/**
838811
* Get all the possible statuses for a post_type
839812
*

0 commit comments

Comments
 (0)