Make WordPress Core


Ignore:
Timestamp:
02/25/2014 05:09:09 PM (12 years ago)
Author:
nacin
Message:

Remove _relocate_children(), which has had no purpose for some time.

props SergeyBiryukov, scribu.
fixes #19367.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r26995 r27261  
    809809
    810810/**
    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 
    837 /**
    838811 * Get all the possible statuses for a post_type
    839812 *
Note: See TracChangeset for help on using the changeset viewer.