]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-widget.php
WordPress 4.6.3-scripts
[autoinstalls/wordpress.git] / wp-includes / class-wp-widget.php
index 9b9e4725b9f035d7a1e887f435436e331c00cdf3..44f3686ddc3ca20598a84e68c8001ac91601dd45 100644 (file)
@@ -10,8 +10,9 @@
 /**
  * Core base class extended to register widgets.
  *
- * This class must be extended for each widget and WP_Widget::widget(), WP_Widget::update()
- * and WP_Widget::form() need to be overridden.
+ * This class must be extended for each widget, and WP_Widget::widget() must be overriden.
+ *
+ * If adding widget options, WP_Widget::update() and WP_Widget::form() should also be overridden.
  *
  * @since 2.8.0
  * @since 4.4.0 Moved to its own file from wp-includes/widgets.php
@@ -168,7 +169,7 @@ class WP_Widget {
         * @access public
         *
         * @see __construct()
-        * 
+        *
         * @param string $id_base         Optional Base ID for the widget, lowercase and unique. If left empty,
         *                                a portion of the widget's class name will be used Has to be unique.
         * @param string $name            Name for the widget displayed on the configuration page.
@@ -352,7 +353,7 @@ class WP_Widget {
                        $instance = $instances[ $this->number ];
 
                        /**
-                        * Filter the settings for a particular widget instance.
+                        * Filters the settings for a particular widget instance.
                         *
                         * Returning false will effectively short-circuit display of the widget.
                         *
@@ -441,7 +442,7 @@ class WP_Widget {
                                }
 
                                /**
-                                * Filter a widget's settings before saving.
+                                * Filters a widget's settings before saving.
                                 *
                                 * Returning false will effectively short-circuit the widget's ability
                                 * to update settings.
@@ -497,7 +498,7 @@ class WP_Widget {
                }
 
                /**
-                * Filter the widget instance's settings before displaying the control form.
+                * Filters the widget instance's settings before displaying the control form.
                 *
                 * Returning false effectively short-circuits display of the control form.
                 *