X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..e08b42e8ad054ec67522d7ac1aaae5dc68cb3d01:/wp-includes/default-widgets.php diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index e4856dac..6c6e321f 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -14,7 +14,7 @@ class WP_Widget_Pages extends WP_Widget { function __construct() { - $widget_ops = array('classname' => 'widget_pages', 'description' => __( 'Your site’s WordPress Pages') ); + $widget_ops = array('classname' => 'widget_pages', 'description' => __( 'A list of your site’s Pages.') ); parent::__construct('pages', __('Pages'), $widget_ops); } @@ -150,8 +150,8 @@ class WP_Widget_Links extends WP_Widget { term_id) . '"' - . ( $link_cat->term_id == $instance['category'] ? ' selected="selected"' : '' ) + echo '\n"; } ?> @@ -161,7 +161,7 @@ class WP_Widget_Links extends WP_Widget { - +
@@ -190,7 +190,7 @@ class WP_Widget_Links extends WP_Widget { class WP_Widget_Search extends WP_Widget { function __construct() { - $widget_ops = array('classname' => 'widget_search', 'description' => __( "A search form for your site") ); + $widget_ops = array('classname' => 'widget_search', 'description' => __( "A search form for your site.") ); parent::__construct('search', __('Search'), $widget_ops); } @@ -233,7 +233,7 @@ class WP_Widget_Search extends WP_Widget { class WP_Widget_Archives extends WP_Widget { function __construct() { - $widget_ops = array('classname' => 'widget_archive', 'description' => __( 'A monthly archive of your site’s posts') ); + $widget_ops = array('classname' => 'widget_archive', 'description' => __( 'A monthly archive of your site’s Posts.') ); parent::__construct('archives', __('Archives'), $widget_ops); } @@ -298,7 +298,7 @@ class WP_Widget_Archives extends WP_Widget { class WP_Widget_Meta extends WP_Widget { function __construct() { - $widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") ); + $widget_ops = array('classname' => 'widget_meta', 'description' => __( "Login, RSS, & WordPress.org links.") ); parent::__construct('meta', __('Meta'), $widget_ops); } @@ -315,10 +315,11 @@ class WP_Widget_Meta extends WP_Widget {
-
++
+ ++
--
+id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" /> +
'widget_recent_comments', 'description' => __( 'The most recent comments' ) ); + $widget_ops = array('classname' => 'widget_recent_comments', 'description' => __( 'Your site’s most recent comments.' ) ); parent::__construct('recent-comments', __('Recent Comments'), $widget_ops); $this->alt_option_name = 'widget_recent_comments'; if ( is_active_widget(false, false, $this->id_base) ) - add_action( 'wp_head', array(&$this, 'recent_comments_style') ); + add_action( 'wp_head', array($this, 'recent_comments_style') ); - add_action( 'comment_post', array(&$this, 'flush_widget_cache') ); - add_action( 'transition_comment_status', array(&$this, 'flush_widget_cache') ); + add_action( 'comment_post', array($this, 'flush_widget_cache') ); + add_action( 'edit_comment', array($this, 'flush_widget_cache') ); + add_action( 'transition_comment_status', array($this, 'flush_widget_cache') ); } function recent_comments_style() { @@ -663,9 +678,11 @@ class WP_Widget_Recent_Comments extends WP_Widget { extract($args, EXTR_SKIP); $output = ''; - $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Recent Comments' ) : $instance['title'], $instance, $this->id_base ); - if ( empty( $instance['number'] ) || ! $number = absint( $instance['number'] ) ) + $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' ); + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; + if ( ! $number ) $number = 5; $comments = get_comments( apply_filters( 'widget_comments_args', array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish' ) ) ); @@ -675,6 +692,10 @@ class WP_Widget_Recent_Comments extends WP_Widget { $output .= '-
++
--
++
__('Entries from any RSS or Atom feed') ); + $widget_ops = array( 'description' => __('Entries from any RSS or Atom feed.') ); $control_ops = array( 'width' => 400, 'height' => 200 ); parent::__construct( 'rss', __('RSS'), $widget_ops, $control_ops ); } @@ -829,7 +850,7 @@ function wp_widget_rss_output( $rss, $args = array() ) { $show_date = (int) $show_date; if ( !$rss->get_item_quantity() ) { - echo '