From f2af1a6a1ff8fd8889c8b96f1a4a4794c9e359e0 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 27 Sep 2015 00:50:04 +0000 Subject: [PATCH] Docs: Improve documentation for the `__construct()`, `recent_comments_style()`, `widget()`, `update()`, and `form()` methods in `WP_Widget_Recent_Comments`. Also fixes a typo in the class DocBlock. Props leemon. Fixes #34022. See #34013. git-svn-id: https://develop.svn.wordpress.org/trunk@34614 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-widget-recent-comments.php | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/src/wp-includes/widgets/class-wp-widget-recent-comments.php b/src/wp-includes/widgets/class-wp-widget-recent-comments.php index 7bf5c6fb96..157205cdc9 100644 --- a/src/wp-includes/widgets/class-wp-widget-recent-comments.php +++ b/src/wp-includes/widgets/class-wp-widget-recent-comments.php @@ -8,7 +8,7 @@ */ /** - * Core class used to implement a Recent_Comments widget. + * Core class used to implement a Recent Comments widget. * * @since 2.8.0 * @@ -16,6 +16,12 @@ */ class WP_Widget_Recent_Comments extends WP_Widget { + /** + * Sets up a new Recent Comments widget instance. + * + * @since 2.8.0 + * @access public + */ public function __construct() { $widget_ops = array('classname' => 'widget_recent_comments', 'description' => __( 'Your site’s most recent comments.' ) ); parent::__construct('recent-comments', __('Recent Comments'), $widget_ops); @@ -25,7 +31,10 @@ class WP_Widget_Recent_Comments extends WP_Widget { add_action( 'wp_head', array($this, 'recent_comments_style') ); } - /** + /** + * Outputs the default styles for the Recent Comments widget. + * + * @since 2.8.0 * @access public */ public function recent_comments_style() { @@ -41,13 +50,19 @@ class WP_Widget_Recent_Comments extends WP_Widget { || ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) ) return; ?> - -.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;} + + ?>

-