Prepare DB queries in more places. Props filosofo. see #6644
git-svn-id: http://svn.automattic.com/wordpress/trunk@7645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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