<!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>[27669] trunk/src/wp-admin/includes/dashboard.php: Inline documentation for hooks in wp-admin/includes/dashboard.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/27669">27669</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-03-24 02:20:33 +0000 (Mon, 24 Mar 2014)</dd>
</dl>

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

Props mauryaratan. Props kpdesign for some minor cleanup.
Fixes <a href="http://core.trac.wordpress.org/ticket/25752">#25752</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesdashboardphp">trunk/src/wp-admin/includes/dashboard.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/dashboard.php (27668 => 27669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/dashboard.php        2014-03-24 02:04:56 UTC (rev 27668)
+++ trunk/src/wp-admin/includes/dashboard.php   2014-03-24 02:20:33 UTC (rev 27669)
</span><span class="lines">@@ -56,16 +56,56 @@
</span><span class="cx">  // WordPress News
</span><span class="cx">  wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress News' ), 'wp_dashboard_primary' );
</span><span class="cx"> 
</span><del>-       // Hook to register new widgets
-       // Filter widget order
</del><span class="cx">   if ( is_network_admin() ) {
</span><ins>+
+               /**
+                * Fires after core widgets for the Network Admin dashboard have been registered.
+                *
+                * @since 3.1.0
+                */
</ins><span class="cx">           do_action( 'wp_network_dashboard_setup' );
</span><ins>+
+               /**
+                * Filter the list of widgets to load for the Network Admin dashboard.
+                *
+                * @since 3.1.0
+                *
+                * @param array $dashboard_widgets An array of dashboard widgets.
+                */
</ins><span class="cx">           $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() );
</span><span class="cx">  } elseif ( is_user_admin() ) {
</span><ins>+
+               /**
+                * Fires after core widgets for the User Admin dashboard have been registered.
+                *
+                * @since 3.1.0
+                */
</ins><span class="cx">           do_action( 'wp_user_dashboard_setup' );
</span><ins>+
+               /**
+                * Filter the list of widgets to load for the User Admin dashboard.
+                *
+                * @since 3.1.0
+                *
+                * @param array $dashboard_widgets An array of dashboard widgets.
+                */
</ins><span class="cx">           $dashboard_widgets = apply_filters( 'wp_user_dashboard_widgets', array() );
</span><span class="cx">  } else {
</span><ins>+
+               /**
+                * Fires after core widgets for the admin dashboard have been registered.
+                *
+                * @since 2.5.0
+                */
</ins><span class="cx">           do_action( 'wp_dashboard_setup' );
</span><ins>+
+               /**
+                * Filter the list of widgets to load for the admin dashboard.
+                *
+                * @since 2.5.0
+                *
+                * @param array $dashboard_widgets An array of dashboard widgets.
+                */
</ins><span class="cx">           $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() );
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="lines">@@ -87,9 +127,10 @@
</span><span class="cx">          update_option( 'dashboard_widget_options', $widget_options );
</span><span class="cx"> 
</span><span class="cx">  /** This action is documented in wp-admin/edit-form-advanced.php */
</span><del>-       do_action('do_meta_boxes', $screen->id, 'normal', '');
</del><ins>+        do_action( 'do_meta_boxes', $screen->id, 'normal', '' );
+
</ins><span class="cx">   /** This action is documented in wp-admin/edit-form-advanced.php */
</span><del>-       do_action('do_meta_boxes', $screen->id, 'side', '');
</del><ins>+        do_action( 'do_meta_boxes', $screen->id, 'side', '' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
</span><span class="lines">@@ -165,7 +206,9 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* Dashboard Widgets */
</del><ins>+//
+// Dashboard Widgets
+//
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Dashboard widget that displays some basic stats about the site.
</span><span class="lines">@@ -220,13 +263,18 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  /**
</span><del>-        * Include additional elements in the 'At a Glance' dashboard widget.
-        * This widget was previously 'Right Now'.
</del><ins>+         * Filter the array of extra elements to list in the 'At a Glance'
+        * dashboard widget.
</ins><span class="cx">    *
</span><ins>+        * Prior to 3.8.0, the widget was named 'Right Now'. Each element
+        * is wrapped in list-item tags on output.
+        *
</ins><span class="cx">    * @since 3.8.0
</span><del>-        * @param array $items Array of items.
</del><ins>+         *
+        * @param array $items Array of extra 'At a Glance' widget items.
</ins><span class="cx">    */
</span><span class="cx">  $elements = apply_filters( 'dashboard_glance_items', array() );
</span><ins>+
</ins><span class="cx">   if ( $elements ) {
</span><span class="cx">          echo '<li>' . implode( "</li>\n<li>", $elements ) . "</li>\n";
</span><span class="cx">  }
</span><span class="lines">@@ -240,20 +288,26 @@
</span><span class="cx">  if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '1' != get_option( 'blog_public' ) ) {
</span><span class="cx"> 
</span><span class="cx">          /**
</span><del>-                * Filter the title attribute for the link displayed in Site Content metabox when search engines are discouraged from indexing the site.
</del><ins>+                 * Filter the link title attribute for the 'Search Engines Discouraged'
+                * message displayed in the 'At a Glance' dashboard widget.
</ins><span class="cx">            *
</span><ins>+                * Prior to 3.8.0, the widget was named 'Right Now'.
+                *
</ins><span class="cx">            * @since 3.0.0
</span><span class="cx">           *
</span><del>-                * @param string Default attribute text.
</del><ins>+                 * @param string $title Default attribute text.
</ins><span class="cx">            */
</span><span class="cx">          $title = apply_filters( 'privacy_on_link_title', __( 'Your site is asking search engines not to index its content' ) );
</span><span class="cx"> 
</span><span class="cx">          /**
</span><del>-                * Filter the text for the link displayed in Site Content metabox when search engines are discouraged from indexing the site.
</del><ins>+                 * Filter the link label for the 'Search Engines Discouraged' message
+                * displayed in the 'At a Glance' dashboard widget.
</ins><span class="cx">            *
</span><ins>+                * Prior to 3.8.0, the widget was named 'Right Now'.
+                *
</ins><span class="cx">            * @since 3.0.0
</span><span class="cx">           *
</span><del>-                * @param string Default text.
</del><ins>+                 * @param string $content Default text.
</ins><span class="cx">            */
</span><span class="cx">          $content = apply_filters( 'privacy_on_link_text' , __( 'Search Engines Discouraged' ) );
</span><span class="cx"> 
</span><span class="lines">@@ -262,11 +316,30 @@
</span><span class="cx">  ?>
</span><span class="cx">  </div>
</span><span class="cx">  <?php
</span><del>-       // activity_box_end has a core action, but only prints content when multisite.
-       // Using an output buffer is the only way to really check if anything's displayed here.
</del><ins>+        /*
+        * activity_box_end has a core action, but only prints content when multisite.
+        * Using an output buffer is the only way to really check if anything's displayed here.
+        */
</ins><span class="cx">   ob_start();
</span><ins>+
+       /**
+        * Fires at the end of the 'At a Glance' dashboard widget.
+        *
+        * Prior to 3.8.0, the widget was named 'Right Now'.
+        *
+        * @since 2.5.0
+        */
</ins><span class="cx">   do_action( 'rightnow_end' );
</span><ins>+
+       /**
+        * Fires at the end of the 'At a Glance' dashboard widget.
+        *
+        * Prior to 3.8.0, the widget was named 'Right Now'.
+        *
+        * @since 2.0.0
+        */
</ins><span class="cx">   do_action( 'activity_box_end' );
</span><ins>+
</ins><span class="cx">   $actions = ob_get_clean();
</span><span class="cx"> 
</span><span class="cx">  if ( !empty( $actions ) ) : ?>
</span><span class="lines">@@ -303,8 +376,20 @@
</span><span class="cx">  <br class="clear" />
</span><span class="cx"> 
</span><span class="cx">  <p class="youhave"><?php echo $sentence; ?></p>
</span><del>-       <?php do_action( 'wpmuadminresult', '' ); ?>
</del><span class="cx"> 
</span><ins>+
+       <?php
+               /**
+                * Fires in the Network Admin 'Right Now' dashboard widget
+                * just before the user and site search form fields.
+                *
+                * @since MU
+                *
+                * @param null $unused
+                */
+               do_action( 'wpmuadminresult', '' );
+       ?>
+
</ins><span class="cx">   <form action="<?php echo network_admin_url('users.php'); ?>" method="get">
</span><span class="cx">          <p>
</span><span class="cx">                  <input type="search" name="s" value="" size="30" autocomplete="off" />
</span><span class="lines">@@ -319,7 +404,18 @@
</span><span class="cx">          </p>
</span><span class="cx">  </form>
</span><span class="cx"> <?php
</span><ins>+       /**
+        * Fires at the end of the 'Right Now' widget in the Network Admin dashboard.
+        *
+        * @since MU
+        */
</ins><span class="cx">   do_action( 'mu_rightnow_end' );
</span><ins>+
+       /**
+        * Fires at the end of the 'Right Now' widget in the Network Admin dashboard.
+        *
+        * @since MU
+        */
</ins><span class="cx">   do_action( 'mu_activity_box_end' );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -361,7 +457,13 @@
</span><span class="cx">          <?php endif; ?>
</span><span class="cx"> 
</span><span class="cx">          <div class="input-text-wrap" id="title-wrap">
</span><del>-                       <label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php echo apply_filters( 'enter_title_here', __( 'Title' ), $post ); ?></label>
</del><ins>+                        <label class="screen-reader-text prompt" for="title" id="title-prompt-text">
+
+                               <?php
+                               /** This filter is documented in wp-admin/edit-form-advanced.php */
+                               echo apply_filters( 'enter_title_here', __( 'Title' ), $post );
+                               ?>
+                       </label>
</ins><span class="cx">                   <input type="text" name="post_title" id="title" autocomplete="off" />
</span><span class="cx">          </div>
</span><span class="cx"> 
</span><span class="lines">@@ -470,6 +572,17 @@
</span><span class="cx">          else
</span><span class="cx">                  $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
</span><span class="cx"> 
</span><ins>+               /**
+                * Filter the action links displayed for each comment in the 'Recent Comments'
+                * dashboard widget.
+                *
+                * @since 2.6.0
+                *
+                * @param array  $actions An array of comment actions. Default actions include:
+                *                        'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam',
+                *                        'Delete', and 'Trash'.
+                * @param object $comment The comment object.
+                */
</ins><span class="cx">           $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
</span><span class="cx"> 
</span><span class="cx">          $i = 0;
</span><span class="lines">@@ -830,9 +943,33 @@
</span><span class="cx">  */
</span><span class="cx"> function wp_dashboard_primary() {
</span><span class="cx">  $feeds = array(
</span><del>-               'news'   => array(
-                       'link'         => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ),
-                       'url'          => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),
</del><ins>+                'news' => array(
+
+                       /**
+                        * Filter the primary link URL for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.5.0
+                        *
+                        * @param string $link The widget's primary link URL.
+                        */
+                       'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ),
+
+                       /**
+                        * Filter the primary feed URL for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param string $url The widget's primary feed URL.
+                        */
+                       'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ),
+
+                       /**
+                        * Filter the primary link title for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param string $title Title attribute for the widget's primary link.
+                        */
</ins><span class="cx">                   'title'        => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ),
</span><span class="cx">                  'items'        => 1,
</span><span class="cx">                  'show_summary' => 1,
</span><span class="lines">@@ -840,8 +977,32 @@
</span><span class="cx">                  'show_date'    => 1,
</span><span class="cx">          ),
</span><span class="cx">          'planet' => array(
</span><del>-                       'link'         => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ),
-                       'url'          => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ),
</del><ins>+
+                       /**
+                        * Filter the secondary link URL for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param string $link The widget's secondary link URL.
+                        */
+                       'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ),
+
+                       /**
+                        * Filter the secondary feed URL for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param string $url The widget's secondary feed URL.
+                        */
+                       'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ),
+
+                       /**
+                        * Filter the secondary link title for the 'WordPress News' dashboard widget.
+                        *
+                        * @since 2.3.0
+                        *
+                        * @param string $title Title attribute for the widget's secondary link.
+                        */
</ins><span class="cx">                   'title'        => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ),
</span><span class="cx">                  'items'        => 3,
</span><span class="cx">                  'show_summary' => 0,
</span><span class="lines">@@ -1057,6 +1218,14 @@
</span><span class="cx">          $notice .= '<div class="clear"></div>';
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+       * Filter the notice output for the 'Browse Happy' nag meta box.
+       *
+       * @since 3.2.0
+       *
+       * @param string $notice   The notice content.
+       * @param array  $response An array containing web browser information.
+       */
</ins><span class="cx">   echo apply_filters( 'browse-happy-notice', $notice, $response );
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>