Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch to passing arrays instead of query strings to functions. Fixes…

… #6647 props filosofo and hakre.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit f05ee1844ff723a6ef08b9185763c372e14d1a0c 1 parent 9e4d80b
westi authored
View
2  wp-admin/import/wordpress.php
@@ -360,7 +360,7 @@ function process_terms() {
unset( $custom_taxonomies['link_category'] );
$custom_taxonomies = array_keys( $custom_taxonomies );
- $current_terms = (array) get_terms( $custom_taxonomies, 'get=all' );
+ $current_terms = (array) get_terms( $custom_taxonomies, array('get' => 'all') );
$taxonomies = array();
foreach ( $current_terms as $term ) {
if ( isset( $_terms[$term->taxonomy] ) ) {
View
2  wp-admin/includes/export.php
@@ -51,7 +51,7 @@ function export_wp($author='') {
unset($custom_taxonomies['post_tag']);
unset($custom_taxonomies['link_category']);
$custom_taxonomies = array_keys($custom_taxonomies);
-$terms = (array) get_terms($custom_taxonomies, 'get=all');
+$terms = (array) get_terms($custom_taxonomies, array('get' => 'all'));
/**
* {@internal Missing Short Description}}
View
4 wp-admin/options-reading.php
@@ -41,8 +41,8 @@
</label>
</p>
<ul>
- <li><?php printf("<label for='page_on_front'>".__('Front page: %s')."</label>", wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li>
- <li><?php printf("<label for='page_for_posts'>".__('Posts page: %s')."</label>", wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li>
+ <li><?php printf("<label for='page_on_front'>" . __('Front page: %s') . "</label>", wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __('- Select -'), 'selected' => get_option('page_on_front') ) ) ); ?></li>
+ <li><?php printf("<label for='page_for_posts'>". __('Posts page: %s') . "</label>", wp_dropdown_pages( array( 'name' => 'page_for_posts','echo' => 0, 'show_option_none' => __('- Select -'), 'selected' => get_option('page_for_posts') ) ) ); ?></li>
</ul>
<?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?>
<div id="front-page-warning" class="updated">
View
2  wp-content/themes/classic/header.php
@@ -17,7 +17,7 @@
</style>
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
- <?php wp_get_archives('type=monthly&format=link'); ?>
+ <?php wp_get_archives(array('type' => 'monthly', 'format' => 'link')); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>
View
2  wp-content/themes/classic/sidebar.php
@@ -24,7 +24,7 @@
</li>
<li id="archives"><?php _e('Archives:'); ?>
<ul>
- <?php wp_get_archives('type=monthly'); ?>
+ <?php wp_get_archives(array('type' => 'monthly')); ?>
</ul>
</li>
<li id="meta"><?php _e('Meta:'); ?>
View
2  wp-content/themes/default/archives.php
@@ -16,7 +16,7 @@
<h2>Archives by Month:</h2>
<ul>
- <?php wp_get_archives('type=monthly'); ?>
+ <?php wp_get_archives(array('type' => 'monthly')); ?>
</ul>
<h2>Archives by Subject:</h2>
View
4 wp-content/themes/default/sidebar.php
@@ -55,11 +55,11 @@
<li><h2>Archives</h2>
<ul>
- <?php wp_get_archives('type=monthly'); ?>
+ <?php wp_get_archives(array('type' => 'monthly')); ?>
</ul>
</li>
- <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
+ <?php wp_list_categories(array('show_count' => 1, 'title_li' => '<h2>Categories</h2>')); ?>
</ul>
<ul>
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
View
2  wp-includes/comment-template.php
@@ -983,7 +983,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
if ( !empty( $css_class ) ) {
echo ' class="'.$css_class.'" ';
}
- $title = the_title_attribute( 'echo=0' );
+ $title = the_title_attribute( array('echo' => 0 ) );
echo apply_filters( 'comments_popup_link_attributes', '' );
View
2  wp-includes/deprecated.php
@@ -592,7 +592,7 @@ function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit
function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
- $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit");
+ $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
$links_array = array();
foreach ($links as $link)
View
2  wp-trackback.php
@@ -7,7 +7,7 @@
if (empty($wp)) {
require_once('./wp-load.php');
- wp('tb=1');
+ wp( array( 'tb' => '1' ) );
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.