Use page_rows() for quick edit for all hierarchical post types. fixes #14194 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@15372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-07-07 07:39:14 +00:00
parent e965180dc1
commit 535275b753
1 changed files with 8 additions and 7 deletions

View File

@ -1231,14 +1231,15 @@ case 'inline-save':
// update the post
edit_post();
$post = array();
if ( 'page' == $_POST['post_type'] ) {
if ( in_array( $_POST['post_type'], get_post_types( array( 'show_ui' => true ) ) ) ) {
$post = array();
$post[] = get_post($_POST['post_ID']);
page_rows($post);
} elseif ( 'post' == $_POST['post_type'] || in_array($_POST['post_type'], get_post_types( array('public' => true) ) ) ) {
$mode = $_POST['post_view'];
$post[] = get_post($_POST['post_ID']);
post_rows($post);
if ( is_post_type_hierarchical( $_POST['post_type'] ) ) {
page_rows( $post );
} else {
$mode = $_POST['post_view'];
post_rows( $post );
}
}
exit;