WordPress.org

Make WordPress Core

Ticket #13179: Adds_a_hidden_input_for_$post_parent.diff

File Adds_a_hidden_input_for_$post_parent.diff, 943 bytes (added by mikeschinkel, 8 years ago)

Adds a hidden <input> for $post_parent to maintain its value during save.

  • trunk/wp-admin/edit-form-advanced.php

     
    211211<input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr($form_action) ?>" />
    212212<input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
    213213<input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr($post_type) ?>" />
     214<input type="hidden" id="parent_id" name="parent_id" value="<?php echo esc_attr( $post->post_parent ); ?>" />
    214215<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr($post->post_status) ?>" />
    215216<input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
    216217<?php