]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/widgets.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-includes / widgets.php
index 6c559c37e7e40cff615f02c50fa606d3f58ced1d..30c1fce53db1db3aeb4f74a66a46454190a17d63 100644 (file)
@@ -114,10 +114,10 @@ function register_widget($widget_class) {
 }
 
 /**
- * Unregister a widget
+ * Unregisters a widget.
  *
- * Unregisters a WP_Widget widget. Useful for unregistering default widgets.
- * Run within a function hooked to the widgets_init action.
+ * Unregisters a WP_Widget widget. Useful for un-registering default widgets.
+ * Run within a function hooked to the {@see 'widgets_init'} action.
  *
  * @since 2.8.0
  *
@@ -125,7 +125,7 @@ function register_widget($widget_class) {
  *
  * @global WP_Widget_Factory $wp_widget_factory
  *
- * @param string $widget_class The name of a class that extends WP_Widget
+ * @param string $widget_class The name of a class that extends WP_Widget.
  */
 function unregister_widget($widget_class) {
        global $wp_widget_factory;
@@ -521,7 +521,7 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
  *
  * @param string   $id_base         The base ID of a widget created by extending WP_Widget.
  * @param callable $update_callback Update callback method for the widget.
- * @param array    $options         Optional. Widget control options. See {@see wp_register_widget_control()}.
+ * @param array    $options         Optional. Widget control options. See wp_register_widget_control().
  *                                  Default empty array.
  */
 function _register_widget_update_callback( $id_base, $update_callback, $options = array() ) {
@@ -552,7 +552,7 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
  * @param int|string $id            Widget ID.
  * @param string     $name          Name attribute for the widget.
  * @param callable   $form_callback Form callback.
- * @param array      $options       Optional. Widget control options. See {@see wp_register_widget_control()}.
+ * @param array      $options       Optional. Widget control options. See wp_register_widget_control().
  *                                  Default empty array.
  */
 function _register_widget_form_callback($id, $name, $form_callback, $options = array()) {
@@ -672,7 +672,7 @@ function dynamic_sidebar( $index = 1 ) {
                $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
 
                /**
-                * Filter the parameters passed to a widget's display callback.
+                * Filters the parameters passed to a widget's display callback.
                 *
                 * Note: The filter is evaluated on both the front end and back end,
                 * including for the Inactive Widgets sidebar on the Widgets screen.
@@ -755,7 +755,7 @@ function dynamic_sidebar( $index = 1 ) {
        do_action( 'dynamic_sidebar_after', $index, true );
 
        /**
-        * Filter whether a sidebar has widgets.
+        * Filters whether a sidebar has widgets.
         *
         * Note: The filter is also evaluated for empty sidebars, and on both the front end
         * and back end, including the Inactive Widgets sidebar on the Widgets screen.
@@ -780,7 +780,7 @@ function dynamic_sidebar( $index = 1 ) {
  * the widget with that callback/$id_base AND that ID is found.
  *
  * NOTE: $widget_id and $id_base are the same for single widgets. To be effective
- * this function has to run after widgets have initialized, at action 'init' or later.
+ * this function has to run after widgets have initialized, at action {@see 'init'} or later.
  *
  * @since 2.2.0
  *
@@ -853,7 +853,7 @@ function is_active_sidebar( $index ) {
        $is_active_sidebar = ! empty( $sidebars_widgets[$index] );
 
        /**
-        * Filter whether a dynamic sidebar is considered "active".
+        * Filters whether a dynamic sidebar is considered "active".
         *
         * @since 3.9.0
         *
@@ -904,7 +904,7 @@ function wp_get_sidebars_widgets( $deprecated = true ) {
                unset($sidebars_widgets['array_version']);
 
        /**
-        * Filter the list of sidebars and their widgets.
+        * Filters the list of sidebars and their widgets.
         *
         * @since 2.7.0
         *
@@ -1233,7 +1233,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
 
        if ( is_wp_error($rss) ) {
                if ( is_admin() || current_user_can('manage_options') )
-                       echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';
+                       echo '<p><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</p>';
                return;
        }
 
@@ -1342,7 +1342,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
        $args['show_date']      = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date'];
 
        if ( ! empty( $args['error'] ) ) {
-               echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), $args['error'] ) . '</strong></p>';
+               echo '<p class="widget-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $args['error'] . '</p>';
        }
 
        $esc_number = esc_attr( $args['number'] );
@@ -1429,10 +1429,9 @@ function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
 }
 
 /**
- * Register all of the default WordPress widgets on startup.
+ * Registers all of the default WordPress widgets on startup.
  *
- * Calls 'widgets_init' action after all of the WordPress widgets have been
- * registered.
+ * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered.
  *
  * @since 2.2.0
  */