Make WordPress Core


Ignore:
Timestamp:
06/30/2012 09:28:15 AM (12 years ago)
Author:
markjaquith
Message:

Prevent child pages from being visually promoted to the top level after Quick Edit. props ssamture. fixes #18615

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r21191 r21192  
    13691369
    13701370    $mode = $_POST['post_view'];
    1371     $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) );
     1371
     1372    $level = 0;
     1373    $request_post = array( get_post( $_POST['post_ID'] ) );
     1374    $parent = $request_post[0]->post_parent;
     1375
     1376    while ( $parent > 0 ) {
     1377        $parent_post = get_post( $parent );
     1378        $parent = $parent_post->post_parent;
     1379        $level++;
     1380    }
     1381
     1382    $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ), $level );
    13721383
    13731384    wp_die();
Note: See TracChangeset for help on using the changeset viewer.