Use array calling style. see #6647

git-svn-id: http://svn.automattic.com/wordpress/trunk@7911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-08 19:19:58 +00:00
parent 2abe38c548
commit 938f29414f
5 changed files with 6 additions and 6 deletions

View File

@ -269,7 +269,7 @@ function wp_dashboard_recent_comments( $sidebar_args ) {
$lambda = create_function( '', 'return 5;' );
add_filter( 'option_posts_per_rss', $lambda ); // hack - comments query doesn't accept per_page parameter
$comments_query = new WP_Query('feed=rss2&withcomments=1');
$comments_query = new WP_Query(array('feed' => 'rss2', 'withcomments' => 1));
remove_filter( 'option_posts_per_rss', $lambda );
$is_first = true;

View File

@ -47,7 +47,7 @@ function wp_delete_category($cat_ID) {
if ( $cat_ID == $default )
return 0;
return wp_delete_term($cat_ID, 'category', "default=$default");
return wp_delete_term($cat_ID, 'category', array('default' => $default));
}
function wp_insert_category($catarr, $wp_error = false) {

View File

@ -489,7 +489,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
*/
function page_rows( $pages ) {
if ( ! $pages )
$pages = get_pages( 'sort_column=menu_order' );
$pages = get_pages( array('sort_column' => 'menu_order') );
if ( ! $pages )
return false;
@ -701,7 +701,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
if (!$categories )
$categories = get_categories( 'hide_empty=0' );
$categories = get_categories( array('hide_empty' => 0) );
if ( $categories ) {
foreach ( $categories as $category ) {

View File

@ -172,7 +172,7 @@ function wp_list_bookmarks($args = '') {
if ( $categorize ) {
//Split the bookmarks into ul's for each category
$cats = get_terms('link_category', "category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");
$cats = get_terms('link_category', array('category_name' => $category_name, 'include' => $category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
foreach ( (array) $cats as $cat ) {
$params = array_merge($r, array('category'=>$cat->term_id));

View File

@ -903,7 +903,7 @@ function wp_widget_recent_entries($args) {
else if ( $number > 15 )
$number = 15;
$r = new WP_Query("showposts=$number&what_to_show=posts&nopaging=0&post_status=publish");
$r = new WP_Query(array('showposts' => $number, 'what_to_show' => 'posts', 'nopaging' => 0, 'post_status' => 'publish'));
if ($r->have_posts()) :
?>
<?php echo $before_widget; ?>