mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Prepare DB queries in more places. Props filosofo. see #6644
git-svn-id: https://develop.svn.wordpress.org/trunk@7645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -892,7 +892,7 @@ function page_template_dropdown( $default = '' ) {
|
||||
|
||||
function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
|
||||
global $wpdb, $post_ID;
|
||||
$items = $wpdb->get_results( "SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = $parent AND post_type = 'page' ORDER BY menu_order" );
|
||||
$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) );
|
||||
|
||||
if ( $items ) {
|
||||
foreach ( $items as $item ) {
|
||||
|
||||
Reference in New Issue
Block a user