Changeset 53364
- Timestamp:
- 05/07/2022 05:14:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r53318 r53364 900 900 * 901 901 * @param int $default_page Optional. The default page ID to be pre-selected. Default 0. 902 * @param int $parent 902 * @param int $parent_page Optional. The parent page ID. Default 0. 903 903 * @param int $level Optional. Page depth level. Default 0. 904 904 * @param int|WP_Post $post Post ID or WP_Post object. 905 905 * @return void|false Void on success, false if the page has no children. 906 906 */ 907 function parent_dropdown( $default_page = 0, $parent = 0, $level = 0, $post = null ) {907 function parent_dropdown( $default_page = 0, $parent_page = 0, $level = 0, $post = null ) { 908 908 global $wpdb; 909 909 910 910 $post = get_post( $post ); 911 $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 ) ); 911 $items = $wpdb->get_results( 912 $wpdb->prepare( 913 "SELECT ID, post_parent, post_title 914 FROM $wpdb->posts 915 WHERE post_parent = %d AND post_type = 'page' 916 ORDER BY menu_order", 917 $parent_page 918 ) 919 ); 912 920 913 921 if ( $items ) {
Note: See TracChangeset
for help on using the changeset viewer.