From a5fe68e002632c190ffbd85167671ed4d4961135 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 21 Jun 2007 16:41:02 +0000 Subject: WP Merge to WP 2.2.1 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1005 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/widgets.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'wp-includes/widgets.php') diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index f4e2681..25027d3 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -332,12 +332,13 @@ function wp_widget_pages( $args ) { $title = empty( $options['title'] ) ? __( 'Pages' ) : $options['title']; $sortby = empty( $options['sortby'] ) ? 'menu_order' : $options['sortby']; + $exclude = empty( $options['exclude'] ) ? '' : '&exclude=' . $options['exclude']; if ( $sortby == 'menu_order' ) { $sortby = 'menu_order, post_title'; } - $out = wp_list_pages( 'title_li=&echo=0&sort_column=' . $sortby ); + $out = wp_list_pages( 'title_li=&echo=0&sort_column=' . $sortby . $exclude ); if ( !empty( $out ) ) { ?> @@ -363,27 +364,32 @@ function wp_widget_pages_control() { } else { $newoptions['sortby'] = 'menu_order'; } + + $newoptions['exclude'] = strip_tags( stripslashes( $_POST['pages-exclude'] ) ); } if ( $options != $newoptions ) { $options = $newoptions; update_option('widget_pages', $options); } $title = attribute_escape($options['title']); + $exclude = attribute_escape( $options['exclude'] ); ?>

+


+

@@ -799,7 +805,7 @@ function wp_widget_recent_comments_register() { function wp_widget_rss($args, $number = 1) { require_once(ABSPATH . WPINC . '/rss.php'); - extract($args); + extract($args, EXTR_SKIP); $options = get_option('widget_rss'); if ( isset($options['error']) && $options['error'] ) return; @@ -854,7 +860,7 @@ function wp_widget_rss($args, $number = 1) { echo "
  • $title$summary
  • "; } } else { - echo __('
  • An error has occured; the feed is probably down. Try again later.
  • '); + echo '
  • ' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '
  • '; } ?> @@ -956,7 +962,7 @@ function wp_widgets_init() { $dims150 = array('height' => 150, 'width' => 300); $class = array('classname' => 'widget_pages'); wp_register_sidebar_widget('pages', __('Pages'), 'wp_widget_pages', $class); - wp_register_widget_control('pages', __('Pages'), 'wp_widget_pages_control', $dims90); + wp_register_widget_control('pages', __('Pages'), 'wp_widget_pages_control', $dims150); $class['classname'] = 'widget_calendar'; wp_register_sidebar_widget('calendar', __('Calendar'), 'wp_widget_calendar', $class); wp_register_widget_control('calendar', __('Calendar'), 'wp_widget_calendar_control', $dims90); -- cgit