Changeset 34111
- Timestamp:
- 09/14/2015 03:19:59 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r34094 r34111 768 768 global $wp_locale; 769 769 $post = get_post(); 770 770 771 771 if ( $for_post ) 772 772 $edit = ! ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ); … … 861 861 * 862 862 * @since 1.5.0 863 * @since 4.4.0 `$post` argument was added. 863 864 * 864 865 * @global wpdb $wpdb 865 866 * 866 * @param int $default Optional. The default page ID to be pre-selected. Default 0. 867 * @param int $parent Optional. The parent page ID. Default 0. 868 * @param int $level Optional. Page depth level. Default 0. 867 * @param int $default Optional. The default page ID to be pre-selected. Default 0. 868 * @param int $parent Optional. The parent page ID. Default 0. 869 * @param int $level Optional. Page depth level. Default 0. 870 * @param int|WP_Post $post Post ID or WP_Post object. 869 871 * 870 872 * @return null|false Boolean False if page has no children, otherwise print out html elements 871 873 */ 872 function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {874 function parent_dropdown( $default = 0, $parent = 0, $level = 0, $post = null ) { 873 875 global $wpdb; 874 $post = get_post( );876 $post = get_post( $post ); 875 877 $items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) ); 876 878
Note: See TracChangeset
for help on using the changeset viewer.