summaryrefslogtreecommitdiffstats
path: root/wp-includes/widgets.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-23 18:28:40 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-23 18:28:40 +0000
commit87bb8cd69cc593fe6bed330fb1791eac9df87167 (patch)
tree6b2ad252df89d2a1863198fd44b321b59e42ef54 /wp-includes/widgets.php
parent0cbda3349a2571904ea063fdd73e018299919589 (diff)
downloadwordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.gz
wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.xz
wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.zip
Merge with WordPress, rev 6285 and untested
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1125 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/widgets.php')
-rw-r--r--wp-includes/widgets.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index 7bd6fbd..c9f2404 100644
--- a/wp-includes/widgets.php
+++ b/wp-includes/widgets.php
@@ -18,9 +18,7 @@ function register_sidebars($number = 1, $args = array()) {
if ( is_string($args) )
parse_str($args, $args);
- $i = 1;
-
- while ( $i <= $number ) {
+ for ( $i=1; $i <= $number; $i++ ) {
$_args = $args;
if ( $number > 1 ) {
$_args['name'] = isset($args['name']) ? $args['name'] : sprintf(__('Sidebar %d'), $i);
@@ -29,7 +27,6 @@ function register_sidebars($number = 1, $args = array()) {
}
$_args['id'] = isset($args['id']) ? $args['id'] : "sidebar-$i";
register_sidebar($_args);
- ++$i;
}
}
@@ -630,7 +627,7 @@ function wp_widget_categories($args, $number = 1) {
wp_dropdown_categories($cat_args . '&show_option_none= ' . __('Select Category'));
?>
-<script lang='javascript'><!--
+<script type='text/javascript'><!--
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
@@ -786,7 +783,7 @@ function wp_widget_categories_register() {
}
$dims = array( 'width' => 350, 'height' => 170 );
- $class = array( 'classname' => 'widget_catgories' );
+ $class = array( 'classname' => 'widget_categories' );
for ( $i = 1; $i <= 9; $i++ ) {
$name = sprintf( __( 'Categories %d' ), $i );
@@ -1001,7 +998,7 @@ function wp_widget_rss_control($number) {
$options = $newoptions = get_option('widget_rss');
if ( $_POST["rss-submit-$number"] ) {
$newoptions[$number]['items'] = (int) $_POST["rss-items-$number"];
- $url = clean_url(strip_tags(stripslashes($_POST["rss-url-$number"])));
+ $url = sanitize_url(strip_tags(stripslashes($_POST["rss-url-$number"])));
$newoptions[$number]['title'] = trim(strip_tags(stripslashes($_POST["rss-title-$number"])));
if ( $url !== $options[$number]['url'] ) {
require_once(ABSPATH . WPINC . '/rss.php');