WordPress.org

Make WordPress Core

Ticket #21618: menu-order-arg.diff

File menu-order-arg.diff, 875 bytes (added by wonderboymusic, 6 years ago)
  • wp-includes/query.php

     
    14521452                if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
    14531453                if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']);
    14541454                if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']);
     1455                if ( '' !== $qv['menu_order'] ) $qv['menu_order'] = absint($qv['menu_order']);
    14551456
    14561457                // Compat. Map subpost to attachment.
    14571458                if ( '' != $qv['subpost'] )
     
    20402041                                $fields = "$wpdb->posts.*";
    20412042                }
    20422043
     2044                if ( '' !== $q['menu_order'] )
     2045                        $where .= " AND $wpdb->posts.menu_order = " . $q['menu_order'];
     2046               
    20432047                // If a month is specified in the querystring, load that month
    20442048                if ( $q['m'] ) {
    20452049                        $q['m'] = '' . preg_replace('|[^0-9]|', '', $q['m']);