<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[27697] trunk/src/wp-includes/default-widgets.php: Inline documentation for hooks in wp-includes/default-widgets.php.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/27697">27697</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-03-25 08:52:22 +0000 (Tue, 25 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Inline documentation for hooks in wp-includes/default-widgets.php.

Props janw.oostendorp and kpdesign.
Fixes <a href="http://core.trac.wordpress.org/ticket/25638">#25638</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesdefaultwidgetsphp">trunk/src/wp-includes/default-widgets.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/default-widgets.php (27696 => 27697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/default-widgets.php        2014-03-25 08:06:38 UTC (rev 27696)
+++ trunk/src/wp-includes/default-widgets.php   2014-03-25 08:52:22 UTC (rev 27697)
</span><span class="lines">@@ -21,14 +21,38 @@
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract( $args );
</span><span class="cx"> 
</span><del>-               $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base);
</del><ins>+                /**
+                * Filter the widget title.
+                *
+                * @since 2.6.0
+                *
+                * @param string $title    The widget title. Default 'Pages'.
+                * @param array  $instance An array of the widget's settings.
+                * @param mixed  $id_base  The widget ID.
+                */
+               $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base );
+
</ins><span class="cx">           $sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby'];
</span><span class="cx">          $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
</span><span class="cx"> 
</span><span class="cx">          if ( $sortby == 'menu_order' )
</span><span class="cx">                  $sortby = 'menu_order, post_title';
</span><span class="cx"> 
</span><del>-               $out = wp_list_pages( apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ) );
</del><ins>+                /**
+                * Filter the arguments for the Pages widget.
+                *
+                * @since 2.8.0
+                *
+                * @see wp_list_pages()
+                *
+                * @param array $args An array of arguments to retrieve the pages list.
+                */
+               $out = wp_list_pages( apply_filters( 'widget_pages_args', array(
+                       'title_li'    => '',
+                       'echo'        => 0,
+                       'sort_column' => $sortby,
+                       'exclude'     => $exclude
+               ) ) );
</ins><span class="cx"> 
</span><span class="cx">          if ( !empty( $out ) ) {
</span><span class="cx">                  echo $before_widget;
</span><span class="lines">@@ -107,7 +131,17 @@
</span><span class="cx">          $limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
</span><span class="cx"> 
</span><span class="cx">          $before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
</span><del>-               wp_list_bookmarks(apply_filters('widget_links_args', array(
</del><ins>+
+               /**
+                * Filter the arguments for the Links widget.
+                *
+                * @since 2.6.0
+                *
+                * @see wp_list_bookmarks()
+                *
+                * @param array $args An array of arguments to retrieve the links list.
+                */
+               wp_list_bookmarks( apply_filters( 'widget_links_args', array(
</ins><span class="cx">                   'title_before' => $before_title, 'title_after' => $after_title,
</span><span class="cx">                  'category_before' => $before_widget, 'category_after' => $after_widget,
</span><span class="cx">                  'show_images' => $show_images, 'show_description' => $show_description,
</span><span class="lines">@@ -115,7 +149,7 @@
</span><span class="cx">                  'category' => $category, 'class' => 'linkcat widget',
</span><span class="cx">                  'orderby' => $orderby, 'order' => $order,
</span><span class="cx">                  'limit' => $limit,
</span><del>-               )));
</del><ins>+                ) ) );
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">  function update( $new_instance, $old_instance ) {
</span><span class="lines">@@ -196,6 +230,8 @@
</span><span class="cx"> 
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract($args);
</span><ins>+
+               /** This filter is documented in wp-includes/default-widgets.php */
</ins><span class="cx">           $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
</span><span class="cx"> 
</span><span class="cx">          echo $before_widget;
</span><span class="lines">@@ -241,20 +277,55 @@
</span><span class="cx">          extract($args);
</span><span class="cx">          $c = ! empty( $instance['count'] ) ? '1' : '0';
</span><span class="cx">          $d = ! empty( $instance['dropdown'] ) ? '1' : '0';
</span><del>-               $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base);
</del><span class="cx"> 
</span><ins>+               /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', empty($instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base );
+
</ins><span class="cx">           echo $before_widget;
</span><span class="cx">          if ( $title )
</span><span class="cx">                  echo $before_title . $title . $after_title;
</span><span class="cx"> 
</span><span class="cx">          if ( $d ) {
</span><span class="cx"> ?>
</span><del>-               <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo esc_attr(__('Select Month')); ?></option> <?php wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $c))); ?> </select>
</del><ins>+                <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
+                       <option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option>
+
+                       <?php
+                       /**
+                        * Filter the arguments for the Archives widget drop-down.
+                        *
+                        * @since 2.8.0
+                        *
+                        * @see wp_get_archives()
+                        *
+                        * @param array $args An array of Archives widget drop-down arguments.
+                        */
+                       wp_get_archives( apply_filters( 'widget_archives_dropdown_args', array(
+                               'type'            => 'monthly',
+                               'format'          => 'option',
+                               'show_post_count' => $c
+                       ) ) );
+?>
+               </select>
</ins><span class="cx"> <?php
</span><span class="cx">          } else {
</span><span class="cx"> ?>
</span><span class="cx">          <ul>
</span><del>-               <?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $c))); ?>
</del><ins>+<?php
+               /**
+                * Filter the arguments for the Archives widget.
+                *
+                * @since 2.8.0
+                *
+                * @see wp_get_archives()
+                *
+                * @param array $args An array of Archives option arguments.
+                */
+               wp_get_archives( apply_filters( 'widget_archives_args', array(
+                       'type'            => 'monthly',
+                       'show_post_count' => $c
+               ) ) );
+?>
</ins><span class="cx">           </ul>
</span><span class="cx"> <?php
</span><span class="cx">          }
</span><span class="lines">@@ -304,8 +375,10 @@
</span><span class="cx"> 
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract($args);
</span><del>-               $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title'], $instance, $this->id_base);
</del><span class="cx"> 
</span><ins>+               /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base );
+
</ins><span class="cx">           echo $before_widget;
</span><span class="cx">          if ( $title )
</span><span class="cx">                  echo $before_title . $title . $after_title;
</span><span class="lines">@@ -315,12 +388,22 @@
</span><span class="cx">                  <li><?php wp_loginout(); ?></li>
</span><span class="cx">                  <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
</span><span class="cx">                  <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
</span><del>-                       <?php echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
</del><ins>+<?php
+                       /**
+                        * Filter the "Powered by WordPress" text in the Meta widget.
+                        *
+                        * @since 3.6.0
+                        *
+                        * @param string $title_text Default title text for the WordPress.org link.
+                        */
+                       echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
</ins><span class="cx">                           esc_url( __( 'https://wordpress.org/' ) ),
</span><span class="cx">                          esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
</span><span class="cx">                          _x( 'WordPress.org', 'meta widget link text' )
</span><del>-                       ) ); ?>
-                       <?php wp_meta(); ?>
</del><ins>+                        ) );
+
+                       wp_meta();
+?>
</ins><span class="cx">                   </ul>
</span><span class="cx"> <?php
</span><span class="cx">          echo $after_widget;
</span><span class="lines">@@ -356,7 +439,10 @@
</span><span class="cx"> 
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract($args);
</span><del>-               $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
</del><ins>+
+               /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
+
</ins><span class="cx">           echo $before_widget;
</span><span class="cx">          if ( $title )
</span><span class="cx">                  echo $before_title . $title . $after_title;
</span><span class="lines">@@ -398,7 +484,18 @@
</span><span class="cx"> 
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract($args);
</span><ins>+
+               /** This filter is documented in wp-includes/default-widgets.php */
</ins><span class="cx">           $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
</span><ins>+
+               /**
+                * Filter the content of the Text widget.
+                *
+                * @since 2.3.0
+                *
+                * @param string    $widget_text The widget content.
+                * @param WP_Widget $instance    WP_Widget instance.
+                */
</ins><span class="cx">           $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance );
</span><span class="cx">          echo $before_widget;
</span><span class="cx">          if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
</span><span class="lines">@@ -448,7 +545,9 @@
</span><span class="cx">  function widget( $args, $instance ) {
</span><span class="cx">          extract( $args );
</span><span class="cx"> 
</span><del>-               $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base);
</del><ins>+                /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );
+
</ins><span class="cx">           $c = ! empty( $instance['count'] ) ? '1' : '0';
</span><span class="cx">          $h = ! empty( $instance['hierarchical'] ) ? '1' : '0';
</span><span class="cx">          $d = ! empty( $instance['dropdown'] ) ? '1' : '0';
</span><span class="lines">@@ -461,7 +560,17 @@
</span><span class="cx"> 
</span><span class="cx">          if ( $d ) {
</span><span class="cx">                  $cat_args['show_option_none'] = __('Select Category');
</span><del>-                       wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args));
</del><ins>+
+                       /**
+                        * Filter the arguments for the Categories widget drop-down.
+                        *
+                        * @since 2.8.0
+                        *
+                        * @see wp_dropdown_categories()
+                        *
+                        * @param array $cat_args An array of Categories widget drop-down arguments.
+                        */
+                       wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) );
</ins><span class="cx"> ?>
</span><span class="cx"> 
</span><span class="cx"> <script type='text/javascript'>
</span><span class="lines">@@ -482,7 +591,15 @@
</span><span class="cx">          <ul>
</span><span class="cx"> <?php
</span><span class="cx">          $cat_args['title_li'] = '';
</span><del>-               wp_list_categories(apply_filters('widget_categories_args', $cat_args));
</del><ins>+
+               /**
+                * Filter the arguments for the Categories widget.
+                *
+                * @since 2.8.0
+                *
+                * @param array $cat_args An array of Categories widget options.
+                */
+               wp_list_categories( apply_filters( 'widget_categories_args', $cat_args ) );
</ins><span class="cx"> ?>
</span><span class="cx">          </ul>
</span><span class="cx"> <?php
</span><span class="lines">@@ -560,13 +677,31 @@
</span><span class="cx">          extract($args);
</span><span class="cx"> 
</span><span class="cx">          $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' );
</span><ins>+
+               /** This filter is documented in wp-includes/default-widgets.php */
</ins><span class="cx">           $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
</span><ins>+
</ins><span class="cx">           $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
</span><span class="cx">          if ( ! $number )
</span><span class="cx">                  $number = 5;
</span><span class="cx">          $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false;
</span><span class="cx"> 
</span><del>-               $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) );
</del><ins>+                /**
+                * Filter the arguments for the Recent Posts widget.
+                *
+                * @since 3.4.0
+                *
+                * @see WP_Query::get_posts()
+                *
+                * @param array $args An array of arguments used to retrieve the recent posts.
+                */
+               $r = new WP_Query( apply_filters( 'widget_posts_args', array(
+                       'posts_per_page'      => $number,
+                       'no_found_rows'       => true,
+                       'post_status'         => 'publish',
+                       'ignore_sticky_posts' => true
+               ) ) );
+
</ins><span class="cx">           if ($r->have_posts()) :
</span><span class="cx"> ?>
</span><span class="cx">          <?php echo $before_widget; ?>
</span><span class="lines">@@ -648,6 +783,15 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  function recent_comments_style() {
</span><ins>+
+               /**
+                * Filter the Recent Comments default widget styles.
+                *
+                * @since 3.1.0
+                *
+                * @param bool   $active  Whether the widget is active. Default true.
+                * @param string $id_base The widget ID.
+                */
</ins><span class="cx">           if ( ! current_theme_supports( 'widgets' ) // Temp hack #14876
</span><span class="cx">                  || ! apply_filters( 'show_recent_comments_widget_style', true, $this->id_base ) )
</span><span class="cx">                  return;
</span><span class="lines">@@ -680,12 +824,29 @@
</span><span class="cx">          $output = '';
</span><span class="cx"> 
</span><span class="cx">          $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' );
</span><ins>+
+               /** This filter is documented in wp-includes/default-widgets.php */
</ins><span class="cx">           $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
</span><ins>+
</ins><span class="cx">           $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
</span><span class="cx">          if ( ! $number )
</span><span class="cx">                  $number = 5;
</span><span class="cx"> 
</span><del>-               $comments = get_comments( apply_filters( 'widget_comments_args', array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish' ) ) );
</del><ins>+                /**
+                * Filter the arguments for the Recent Comments widget.
+                *
+                * @since 3.4.0
+                *
+                * @see get_comments()
+                *
+                * @param array $comment_args An array of arguments used to retrieve the recent comments.
+                */
+               $comments = get_comments( apply_filters( 'widget_comments_args', array(
+                       'number'      => $number,
+                       'status'      => 'approve',
+                       'post_status' => 'publish'
+               ) ) );
+
</ins><span class="cx">           $output .= $before_widget;
</span><span class="cx">          if ( $title )
</span><span class="cx">                  $output .= $before_title . $title . $after_title;
</span><span class="lines">@@ -782,7 +943,9 @@
</span><span class="cx">          if ( empty($title) )
</span><span class="cx">                  $title = empty($desc) ? __('Unknown Feed') : $desc;
</span><span class="cx"> 
</span><del>-               $title = apply_filters('widget_title', $title, $instance, $this->id_base);
</del><ins>+                /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
+
</ins><span class="cx">           $url = esc_url(strip_tags($url));
</span><span class="cx">          $icon = includes_url('images/rss.png');
</span><span class="cx">          if ( $title )
</span><span class="lines">@@ -1054,13 +1217,29 @@
</span><span class="cx">                          $title = $tax->labels->name;
</span><span class="cx">                  }
</span><span class="cx">          }
</span><del>-               $title = apply_filters('widget_title', $title, $instance, $this->id_base);
</del><span class="cx"> 
</span><ins>+               /** This filter is documented in wp-includes/default-widgets.php */
+               $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
+
</ins><span class="cx">           echo $before_widget;
</span><span class="cx">          if ( $title )
</span><span class="cx">                  echo $before_title . $title . $after_title;
</span><span class="cx">          echo '<div class="tagcloud">';
</span><del>-               wp_tag_cloud( apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy) ) );
</del><ins>+
+               /**
+                * Filter the taxonomy used in the Tag Cloud widget.
+                *
+                * @since 2.8.0
+                * @since 3.0.0 Added taxonomy drop-down.
+                *
+                * @see wp_tag_cloud()
+                *
+                * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'.
+                */
+               wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
+                       'taxonomy' => $current_taxonomy
+               ) ) );
+
</ins><span class="cx">           echo "</div>\n";
</span><span class="cx">          echo $after_widget;
</span><span class="cx">  }
</span><span class="lines">@@ -1115,6 +1294,7 @@
</span><span class="cx">          if ( !$nav_menu )
</span><span class="cx">                  return;
</span><span class="cx"> 
</span><ins>+               /** This filter is documented in wp-includes/default-widgets.php */
</ins><span class="cx">           $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
</span><span class="cx"> 
</span><span class="cx">          echo $args['before_widget'];
</span><span class="lines">@@ -1205,7 +1385,12 @@
</span><span class="cx"> 
</span><span class="cx">  register_widget('WP_Nav_Menu_Widget');
</span><span class="cx"> 
</span><del>-       do_action('widgets_init');
</del><ins>+        /**
+        * Fires after all default WordPress widgets have been registered.
+        *
+        * @since 2.2.0
+        */
+       do_action( 'widgets_init' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> add_action('init', 'wp_widgets_init', 1);
</span></span></pre>
</div>
</div>

</body>
</html>