WordPress.org

Make WordPress Core

Changeset 7911


Ignore:
Timestamp:
05/08/2008 07:19:58 PM (10 years ago)
Author:
ryan
Message:

Use array calling style. see #6647

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r7852 r7911  
    270270    $lambda = create_function( '', 'return 5;' );
    271271    add_filter( 'option_posts_per_rss', $lambda ); // hack - comments query doesn't accept per_page parameter
    272     $comments_query = new WP_Query('feed=rss2&withcomments=1');
     272    $comments_query = new WP_Query(array('feed' => 'rss2', 'withcomments' => 1));
    273273    remove_filter( 'option_posts_per_rss', $lambda );
    274274
  • trunk/wp-admin/includes/taxonomy.php

    r7483 r7911  
    4848        return 0;
    4949
    50     return wp_delete_term($cat_ID, 'category', "default=$default");
     50    return wp_delete_term($cat_ID, 'category', array('default' => $default));
    5151}
    5252
  • trunk/wp-admin/includes/template.php

    r7883 r7911  
    490490function page_rows( $pages ) {
    491491    if ( ! $pages )
    492         $pages = get_pages( 'sort_column=menu_order' );
     492        $pages = get_pages( array('sort_column' => 'menu_order') );
    493493
    494494    if ( ! $pages )
     
    702702function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
    703703    if (!$categories )
    704         $categories = get_categories( 'hide_empty=0' );
     704        $categories = get_categories( array('hide_empty' => 0) );
    705705
    706706    if ( $categories ) {
  • trunk/wp-includes/bookmark-template.php

    r6828 r7911  
    173173    if ( $categorize ) {
    174174        //Split the bookmarks into ul's for each category
    175         $cats = get_terms('link_category', "category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");
     175        $cats = get_terms('link_category', array('category_name' => $category_name, 'include' => $category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
    176176
    177177        foreach ( (array) $cats as $cat ) {
  • trunk/wp-includes/widgets.php

    r7902 r7911  
    904904        $number = 15;
    905905
    906     $r = new WP_Query("showposts=$number&what_to_show=posts&nopaging=0&post_status=publish");
     906    $r = new WP_Query(array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish'));
    907907    if ($r->have_posts()) :
    908908?>
Note: See TracChangeset for help on using the changeset viewer.