WordPress.org

Make WordPress Core

Ticket #10047: 10047.diff

File 10047.diff, 978 bytes (added by dd32, 9 years ago)
  • wp-includes/link-template.php

     
    10381049
    10391050        $order = $start ? 'ASC' : 'DESC';
    10401051
    1041         return get_posts("numberposts=1&order=$order&orderby=ID&category=$categories");
     1052        return get_posts( array('numberposts' => 1, 'order' => $order, 'orderby' => 'ID', 'category' => $categories) );
    10421053}
    10431054
    10441055/**
  • xmlrpc.php

     
    604604                        $page_limit = $num_pages;
    605605                }
    606606
    607                 $pages = get_posts( "post_type=page&post_status=all&numberposts={$page_limit}" );
     607                $pages = get_posts( array('post_type' => 'page', 'post_status' => 'all', 'numberposts' => $page_limit) );
    608608                $num_pages = count($pages);
    609609
    610610                // If we have pages, put together their info.