1490 | | ?> |
1491 | | <label> |
1492 | | <span class="title"><?php _e( 'Parent' ); ?></span> |
1493 | | <?php |
1494 | | $dropdown_args = array( |
1495 | | 'post_type' => $post_type_object->name, |
1496 | | 'selected' => $post->post_parent, |
1497 | | 'name' => 'post_parent', |
1498 | | 'show_option_none' => __( 'Main Page (no parent)' ), |
1499 | | 'option_none_value' => 0, |
1500 | | 'sort_column' => 'menu_order, post_title', |
1501 | | ); |
1503 | | if ( $bulk ) |
1504 | | $dropdown_args['show_option_no_change'] = __( '— No Change —' ); |
| 1491 | $dropdown_args = array( |
| 1492 | 'post_type' => $post_type_object->name, |
| 1493 | 'selected' => $post->post_parent, |
| 1494 | 'name' => 'post_parent', |
| 1495 | 'show_option_none' => __( 'Main Page (no parent)' ), |
| 1496 | 'option_none_value' => 0, |
| 1497 | 'sort_column' => 'menu_order, post_title', |
| 1498 | 'echo' => 0, |
| 1499 | ); |
1517 | | wp_dropdown_pages( $dropdown_args ); |
| 1504 | /** |
| 1505 | * Filters the arguments used to generate the Quick Edit page-parent drop-down. |
| 1506 | * |
| 1507 | * @since 2.7.0 |
| 1508 | * |
| 1509 | * @see wp_dropdown_pages() |
| 1510 | * |
| 1511 | * @param array $dropdown_args An array of arguments. |
| 1512 | */ |
| 1513 | $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args ); |
| 1514 | |
| 1515 | //Get dropdown HTML in variable to check if the dropdown is empty |
| 1516 | $parent_dropdown = wp_dropdown_pages( $dropdown_args ); |
| 1517 | |
| 1518 | //If dropdown is empty don't show the label or dropdown. |
| 1519 | if( "" != $parent_dropdown ) : |