WordPress.org

Make WordPress Core

Changeset 15373


Ignore:
Timestamp:
07/07/2010 07:39:33 AM (8 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-admin/admin-ajax.php

    r15337 r15373  
    12321232    edit_post();
    12331233
    1234     $post = array();
    1235     if ( 'page' == $_POST['post_type'] ) {
     1234    if ( in_array( $_POST['post_type'], get_post_types( array( 'show_ui' => true ) ) ) ) {
     1235        $post = array();
    12361236        $post[] = get_post($_POST['post_ID']);
    1237         page_rows($post);
    1238     } elseif ( 'post' == $_POST['post_type'] || in_array($_POST['post_type'], get_post_types( array('public' => true) ) ) ) {
    1239         $mode = $_POST['post_view'];
    1240         $post[] = get_post($_POST['post_ID']);
    1241         post_rows($post);
     1237        if ( is_post_type_hierarchical( $_POST['post_type'] ) ) {
     1238            page_rows( $post );
     1239        } else {
     1240            $mode = $_POST['post_view'];
     1241            post_rows( $post );
     1242        }
    12421243    }
    12431244
Note: See TracChangeset for help on using the changeset viewer.