<!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>[28130] trunk/src/wp-includes/general-template.php: Inline documentation for hooks in wp-includes/general-template.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/28130">28130</a></dd>
<dt>Author</dt> <dd>DrewAPicture</dd>
<dt>Date</dt> <dd>2014-04-15 04:00:48 +0000 (Tue, 15 Apr 2014)</dd>
</dl>

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

Props jesin, kpdesign.
See <a href="http://core.trac.wordpress.org/ticket/27719">#27719</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/general-template.php (28129 => 28130)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/general-template.php       2014-04-15 02:22:07 UTC (rev 28129)
+++ trunk/src/wp-includes/general-template.php  2014-04-15 04:00:48 UTC (rev 28130)
</span><span class="lines">@@ -15,13 +15,25 @@
</span><span class="cx">  * For the parameter, if the file is called "header-special.php" then specify
</span><span class="cx">  * "special".
</span><span class="cx">  *
</span><del>- * @uses locate_template()
</del><span class="cx">  * @since 1.5.0
</span><del>- * @uses do_action() Calls 'get_header' action.
</del><span class="cx">  *
</span><ins>+ * @uses locate_template()
+ *
</ins><span class="cx">  * @param string $name The name of the specialised header.
</span><span class="cx">  */
</span><span class="cx"> function get_header( $name = null ) {
</span><ins>+       /**
+        * Fires before the header template file is loaded.
+        *
+        * The hook allows a specific header template file to be used in place of the
+        * default header template file. If your file is called header-new.php,
+        * you would specify the filename in the hook as get_header( 'new' ).
+        *
+        * @since 2.1.0
+        * @since 2.8.0 $name parameter added.
+        *
+        * @param string $name Name of the specific header file to use.
+        */
</ins><span class="cx">   do_action( 'get_header', $name );
</span><span class="cx"> 
</span><span class="cx">  $templates = array();
</span><span class="lines">@@ -45,13 +57,25 @@
</span><span class="cx">  * For the parameter, if the file is called "footer-special.php" then specify
</span><span class="cx">  * "special".
</span><span class="cx">  *
</span><del>- * @uses locate_template()
</del><span class="cx">  * @since 1.5.0
</span><del>- * @uses do_action() Calls 'get_footer' action.
</del><span class="cx">  *
</span><ins>+ * @uses locate_template()
+ *
</ins><span class="cx">  * @param string $name The name of the specialised footer.
</span><span class="cx">  */
</span><span class="cx"> function get_footer( $name = null ) {
</span><ins>+       /**
+        * Fires before the footer template file is loaded.
+        *
+        * The hook allows a specific footer template file to be used in place of the
+        * default footer template file. If your file is called footer-new.php,
+        * you would specify the filename in the hook as get_footer( 'new' ).
+        *
+        * @since 2.1.0
+        * @since 2.8.0 $name parameter added.
+        *
+        * @param string $name Name of the specific footer file to use.
+        */
</ins><span class="cx">   do_action( 'get_footer', $name );
</span><span class="cx"> 
</span><span class="cx">  $templates = array();
</span><span class="lines">@@ -75,13 +99,25 @@
</span><span class="cx">  * For the parameter, if the file is called "sidebar-special.php" then specify
</span><span class="cx">  * "special".
</span><span class="cx">  *
</span><del>- * @uses locate_template()
</del><span class="cx">  * @since 1.5.0
</span><del>- * @uses do_action() Calls 'get_sidebar' action.
</del><span class="cx">  *
</span><ins>+ * @uses locate_template()
+ *
</ins><span class="cx">  * @param string $name The name of the specialised sidebar.
</span><span class="cx">  */
</span><span class="cx"> function get_sidebar( $name = null ) {
</span><ins>+       /**
+        * Fires before the sidebar template file is loaded.
+        *
+        * The hook allows a specific sidebar template file to be used in place of the
+        * default sidebar template file. If your file is called sidebar-new.php,
+        * you would specify the filename in the hook as get_sidebar( 'new' ).
+        *
+        * @since 2.2.0
+        * @since 2.8.0 $name parameter added.
+        *
+        * @param string $name Name of the specific sidebar file to use.
+        */
</ins><span class="cx">   do_action( 'get_sidebar', $name );
</span><span class="cx"> 
</span><span class="cx">  $templates = array();
</span><span class="lines">@@ -112,14 +148,25 @@
</span><span class="cx">  * For the $name parameter, if the file is called "{slug}-special.php" then specify
</span><span class="cx">  * "special".
</span><span class="cx">  *
</span><del>- * @uses locate_template()
</del><span class="cx">  * @since 3.0.0
</span><del>- * @uses do_action() Calls 'get_template_part_{$slug}' action.
</del><span class="cx">  *
</span><ins>+ * @uses locate_template()
+ *
</ins><span class="cx">  * @param string $slug The slug name for the generic template.
</span><span class="cx">  * @param string $name The name of the specialised template.
</span><span class="cx">  */
</span><span class="cx"> function get_template_part( $slug, $name = null ) {
</span><ins>+       /**
+        * Fires before the specified template part file is loaded.
+        *
+        * The dynamic portion of the hook name, $slug, refers to the slug name
+        * for the generic template part.
+        *
+        * @since 3.0.0
+        *
+        * @param string $slug The slug name for the generic template.
+        * @param string $name The name of the specialized template.
+        */
</ins><span class="cx">   do_action( "get_template_part_{$slug}", $slug, $name );
</span><span class="cx"> 
</span><span class="cx">  $templates = array();
</span><span class="lines">@@ -150,16 +197,31 @@
</span><span class="cx">  * search. To give a few examples of what it can be used for.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><del>- * @uses apply_filters() Calls 'search_form_format' filter to determine which type to use for the search field.
- *  If set to 'html5', it changes to search input type and adds placeholder text.
</del><span class="cx">  *
</span><span class="cx">  * @param boolean $echo Default to echo and not return the form.
</span><span class="cx">  * @return string|null String when retrieving, null when displaying or if searchform.php exists.
</span><span class="cx">  */
</span><span class="cx"> function get_search_form( $echo = true ) {
</span><ins>+       /**
+        * Fires before the search form is retrieved, at the start of get_search_form().
+        *
+        * @since 2.7.0 as 'get_search_form' action.
+        * @since 3.6.0
+        *
+        * @link https://core.trac.wordpress.org/ticket/19321
+        */
</ins><span class="cx">   do_action( 'pre_get_search_form' );
</span><span class="cx"> 
</span><span class="cx">  $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
</span><ins>+
+       /**
+        * Filter the HTML format of the search form.
+        *
+        * @since 3.6.0
+        *
+        * @param string $format The type of markup to use in the search form.
+        *                       Accepts 'html5', 'xhtml'.
+        */
</ins><span class="cx">   $format = apply_filters( 'search_form_format', $format );
</span><span class="cx"> 
</span><span class="cx">  $search_form_template = locate_template( 'searchform.php' );
</span><span class="lines">@@ -187,7 +249,15 @@
</span><span class="cx">          }
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * Filter the HTML output of the search form.
+        *
+        * @since 2.7.0
+        *
+        * @param string $form The search form HTML output.
+        */
</ins><span class="cx">   $result = apply_filters( 'get_search_form', $form );
</span><ins>+
</ins><span class="cx">   if ( null === $result )
</span><span class="cx">          $result = $form;
</span><span class="cx"> 
</span><span class="lines">@@ -204,7 +274,6 @@
</span><span class="cx">  * or log out depending on whether they are currently logged in.
</span><span class="cx">  *
</span><span class="cx">  * @since 1.5.0
</span><del>- * @uses apply_filters() Calls 'loginout' hook on HTML link content.
</del><span class="cx">  *
</span><span class="cx">  * @param string $redirect Optional path to redirect to on login/logout.
</span><span class="cx">  * @param boolean $echo Default to echo and not return the link.
</span><span class="lines">@@ -216,10 +285,19 @@
</span><span class="cx">  else
</span><span class="cx">          $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
</span><span class="cx"> 
</span><del>-       if ( $echo )
-               echo apply_filters('loginout', $link);
-       else
-               return apply_filters('loginout', $link);
</del><ins>+        if ( $echo ) {
+               /**
+                * Filter the HTML output for the Log In/Log Out link.
+                *
+                * @since 1.5.0
+                *
+                * @param string $link The HTML link content.
+                */
+               echo apply_filters( 'loginout', $link );
+       } else {
+               /** This filter is documented in wp-includes/general-template.php */
+               return apply_filters( 'loginout', $link );
+       }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -228,9 +306,9 @@
</span><span class="cx">  * Returns the URL that allows the user to log out of the site.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><ins>+ *
</ins><span class="cx">  * @uses wp_nonce_url() To protect against CSRF.
</span><span class="cx">  * @uses site_url() To generate the log out URL.
</span><del>- * @uses apply_filters() calls 'logout_url' hook on final logout URL.
</del><span class="cx">  *
</span><span class="cx">  * @param string $redirect Path to redirect to on logout.
</span><span class="cx">  * @return string A log out URL.
</span><span class="lines">@@ -244,7 +322,15 @@
</span><span class="cx">  $logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
</span><span class="cx">  $logout_url = wp_nonce_url( $logout_url, 'log-out' );
</span><span class="cx"> 
</span><del>-       return apply_filters('logout_url', $logout_url, $redirect);
</del><ins>+        /**
+        * Filter the logout URL.
+        *
+        * @since 2.8.0
+        *
+        * @param string $logout_url The Log Out URL.
+        * @param string $redirect   Path to redirect to on logout.
+        */
+       return apply_filters( 'logout_url', $logout_url, $redirect );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -253,8 +339,8 @@
</span><span class="cx">  * Returns the URL that allows the user to log in to the site.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><ins>+ *
</ins><span class="cx">  * @uses site_url() To generate the log in URL.
</span><del>- * @uses apply_filters() calls 'login_url' hook on final login URL.
</del><span class="cx">  *
</span><span class="cx">  * @param string $redirect Path to redirect to on login.
</span><span class="cx">  * @param bool $force_reauth Whether to force reauthorization, even if a cookie is present. Default is false.
</span><span class="lines">@@ -269,7 +355,15 @@
</span><span class="cx">  if ( $force_reauth )
</span><span class="cx">          $login_url = add_query_arg('reauth', '1', $login_url);
</span><span class="cx"> 
</span><del>-       return apply_filters('login_url', $login_url, $redirect);
</del><ins>+        /**
+        * Filter the login URL.
+        *
+        * @since 2.8.0
+        *
+        * @param string $login_url The login URL.
+        * @param string $redirect  The path to redirect to on login, if supplied.
+        */
+       return apply_filters( 'login_url', $login_url, $redirect );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -278,12 +372,19 @@
</span><span class="cx">  * Returns the URL that allows the user to register on the site.
</span><span class="cx">  *
</span><span class="cx">  * @since 3.6.0
</span><ins>+ *
</ins><span class="cx">  * @uses site_url() To generate the registration URL.
</span><del>- * @uses apply_filters() calls 'register_url' hook on final URL.
</del><span class="cx">  *
</span><del>- * @return string
</del><ins>+ * @return string User registration URL.
</ins><span class="cx">  */
</span><span class="cx"> function wp_registration_url() {
</span><ins>+       /**
+        * Filter the user registration URL.
+        *
+        * @since 3.6.0
+        *
+        * @param string $register The user registration URL.
+        */
</ins><span class="cx">   return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -292,6 +393,7 @@
</span><span class="cx">  * the HTML immediately. Pass array('echo'=>false) to return the string instead.
</span><span class="cx">  *
</span><span class="cx">  * @since 3.0.0
</span><ins>+ *
</ins><span class="cx">  * @param array $args Configuration options to modify the form output.
</span><span class="cx">  * @return string|null String when retrieving, null when displaying.
</span><span class="cx">  */
</span><span class="lines">@@ -312,6 +414,16 @@
</span><span class="cx">          'value_username' => '',
</span><span class="cx">          'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
</span><span class="cx">  );
</span><ins>+
+       /**
+        * Filter the default login form output arguments.
+        *
+        * @since 3.0.0
+        *
+        * @see wp_login_form()
+        *
+        * @param array $defaults An array of default login form arguments.
+        */
</ins><span class="cx">   $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
</span><span class="cx"> 
</span><span class="cx">  $form = '
</span><span class="lines">@@ -346,8 +458,8 @@
</span><span class="cx">  * Returns the URL that allows the user to retrieve the lost password
</span><span class="cx">  *
</span><span class="cx">  * @since 2.8.0
</span><ins>+ *
</ins><span class="cx">  * @uses site_url() To generate the lost password URL
</span><del>- * @uses apply_filters() calls 'lostpassword_url' hook on the lostpassword url
</del><span class="cx">  *
</span><span class="cx">  * @param string $redirect Path to redirect to on login.
</span><span class="cx">  * @return string Lost password URL.
</span><span class="lines">@@ -359,6 +471,15 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
</span><ins>+
+       /**
+        * Filter the Lost Password URL.
+        *
+        * @since 2.8.0
+        *
+        * @param string $lostpassword_url The lost password page URL.
+        * @param string $redirect         The path to redirect to on login.
+        */
</ins><span class="cx">   return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -369,7 +490,6 @@
</span><span class="cx">  * not logged in and registration is enabled or to the dashboard if logged in.
</span><span class="cx">  *
</span><span class="cx">  * @since 1.5.0
</span><del>- * @uses apply_filters() Calls 'register' hook on register / admin link content.
</del><span class="cx">  *
</span><span class="cx">  * @param string $before Text to output before the link (defaults to <li>).
</span><span class="cx">  * @param string $after Text to output after the link (defaults to </li>).
</span><span class="lines">@@ -387,10 +507,22 @@
</span><span class="cx">          $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       if ( $echo )
-               echo apply_filters('register', $link);
-       else
-               return apply_filters('register', $link);
</del><ins>+        if ( $echo ) {
+               /**
+                * Filter the HTML link to the Registration or Admin page.
+                *
+                * Users are sent to the admin page if logged-in, or the registration page
+                * if enabled and logged-out.
+                *
+                * @since 1.5.0
+                *
+                * @param string $link The HTML code for the link to the Registration or Admin page.
+                */
+               echo apply_filters( 'register', $link );
+       } else {
+               /** This filter is documented in wp-includes/general-template.php */
+               return apply_filters( 'register', $link );
+       }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -400,11 +532,16 @@
</span><span class="cx">  * but one purpose might have been to allow for theme switching.
</span><span class="cx">  *
</span><span class="cx">  * @since 1.5.0
</span><ins>+ *
</ins><span class="cx">  * @link http://trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action.
</span><del>- * @uses do_action() Calls 'wp_meta' hook.
</del><span class="cx">  */
</span><span class="cx"> function wp_meta() {
</span><del>-       do_action('wp_meta');
</del><ins>+        /**
+        * Fires before displaying echoed content in the sidebar.
+        *
+        * @since 1.5.0
+        */
+       do_action( 'wp_meta' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -529,10 +666,27 @@
</span><span class="cx">          $url = false;
</span><span class="cx"> 
</span><span class="cx">  if ( 'display' == $filter ) {
</span><del>-               if ( $url )
-                       $output = apply_filters('bloginfo_url', $output, $show);
-               else
-                       $output = apply_filters('bloginfo', $output, $show);
</del><ins>+                if ( $url ) {
+                       /**
+                        * Filter the URL returned by get_bloginfo().
+                        *
+                        * @since 2.0.5
+                        *
+                        * @param mixed $output The URL returned by bloginfo().
+                        * @param mixed $show   Type of information requested.
+                        */
+                       $output = apply_filters( 'bloginfo_url', $output, $show );
+               } else {
+                       /**
+                        * Filter the site information returned by get_bloginfo().
+                        *
+                        * @since 0.71
+                        *
+                        * @param mixed $output The requested non-URL site information.
+                        * @param mixed $show   Type of information requested.
+                        */
+                       $output = apply_filters( 'bloginfo', $output, $show );
+               }
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">  return $output;
</span><span class="lines">@@ -654,7 +808,16 @@
</span><span class="cx">          $title = $prefix . implode( " $sep ", $title_array );
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       $title = apply_filters('wp_title', $title, $sep, $seplocation);
</del><ins>+        /**
+        * Filter the text of the page title.
+        *
+        * @since 2.0.0
+        *
+        * @param string $title       Page title.
+        * @param string $sep         Title separator.
+        * @param string $seplocation Location of the separator (left or right).
+        */
+       $title = apply_filters( 'wp_title', $title, $sep, $seplocation );
</ins><span class="cx"> 
</span><span class="cx">  // Send it out
</span><span class="cx">  if ( $display )
</span><span class="lines">@@ -686,7 +849,15 @@
</span><span class="cx">  if ( !isset($_post->post_title) )
</span><span class="cx">          return;
</span><span class="cx"> 
</span><del>-       $title = apply_filters('single_post_title', $_post->post_title, $_post);
</del><ins>+        /**
+        * Filter the page title for a single post.
+        *
+        * @since 0.71
+        *
+        * @param string $_post_title The single post page title.
+        * @param object $_post       The current queried object as returned by get_queried_object().
+        */
+       $title = apply_filters( 'single_post_title', $_post->post_title, $_post );
</ins><span class="cx">   if ( $display )
</span><span class="cx">          echo $prefix . $title;
</span><span class="cx">  else
</span><span class="lines">@@ -714,6 +885,7 @@
</span><span class="cx">          $post_type = reset( $post_type );
</span><span class="cx"> 
</span><span class="cx">  $post_type_obj = get_post_type_object( $post_type );
</span><ins>+
</ins><span class="cx">   /**
</span><span class="cx">   * Filter the post type archive title.
</span><span class="cx">   *
</span><span class="lines">@@ -795,14 +967,36 @@
</span><span class="cx">  if ( !$term )
</span><span class="cx">          return;
</span><span class="cx"> 
</span><del>-       if ( is_category() )
</del><ins>+        if ( is_category() ) {
+               /**
+                * Filter the category archive page title.
+                *
+                * @since 2.0.10
+                *
+                * @param string $term_name Category name for archive being displayed.
+                */
</ins><span class="cx">           $term_name = apply_filters( 'single_cat_title', $term->name );
</span><del>-       elseif ( is_tag() )
</del><ins>+        } elseif ( is_tag() ) {
+               /**
+                * Filter the tag archive page title.
+                *
+                * @since 2.3.0
+                *
+                * @param string $term_name Tag name for archive being displayed.
+                */
</ins><span class="cx">           $term_name = apply_filters( 'single_tag_title', $term->name );
</span><del>-       elseif ( is_tax() )
</del><ins>+        } elseif ( is_tax() ) {
+               /**
+                * Filter the custom taxonomy archive page title.
+                *
+                * @since 3.1.0
+                *
+                * @param string $term_name Term name for archive being displayed.
+                */
</ins><span class="cx">           $term_name = apply_filters( 'single_term_title', $term->name );
</span><del>-       else
</del><ins>+        } else {
</ins><span class="cx">           return;
</span><ins>+       }
</ins><span class="cx"> 
</span><span class="cx">  if ( empty( $term_name ) )
</span><span class="cx">          return;
</span><span class="lines">@@ -902,6 +1096,13 @@
</span><span class="cx">  else // custom
</span><span class="cx">          $link_html = "\t$before<a href='$url'>$text</a>$after\n";
</span><span class="cx"> 
</span><ins>+       /**
+        * Filter the archive link content.
+        *
+        * @since 2.6.0
+        *
+        * @param string $link_html The archive HTML link content.
+        */
</ins><span class="cx">   $link_html = apply_filters( 'get_archives_link', $link_html );
</span><span class="cx"> 
</span><span class="cx">  return $link_html;
</span><span class="lines">@@ -978,7 +1179,24 @@
</span><span class="cx">          $archive_week_end_date_format = get_option('date_format');
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * Filter the SQL WHERE clause for retrieving archives.
+        *
+        * @since 2.2.0
+        *
+        * @param string $sql_where Portion of SQL query containing the WHERE clause.
+        * @param array  $r         An array of default arguments.
+        */
</ins><span class="cx">   $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
</span><ins>+
+       /**
+        * Filter the SQL JOIN clause for retrieving archives.
+        *
+        * @since 2.2.0
+        *
+        * @param string $sql_join Portion of SQL query containing JOIN clause.
+        * @param array  $r        An array of default arguments.
+        */
</ins><span class="cx">   $join = apply_filters( 'getarchives_join', '', $r );
</span><span class="cx"> 
</span><span class="cx">  $output = '';
</span><span class="lines">@@ -1137,10 +1355,12 @@
</span><span class="cx">  if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
</span><span class="cx">          if ( is_array($cache) && isset( $cache[ $key ] ) ) {
</span><span class="cx">                  if ( $echo ) {
</span><del>-                               echo apply_filters( 'get_calendar',  $cache[$key] );
</del><ins>+                                /** This filter is documented in wp-includes/general-template.php */
+                               echo apply_filters( 'get_calendar', $cache[$key] );
</ins><span class="cx">                           return;
</span><span class="cx">                  } else {
</span><del>-                               return apply_filters( 'get_calendar',  $cache[$key] );
</del><ins>+                                /** This filter is documented in wp-includes/general-template.php */
+                               return apply_filters( 'get_calendar', $cache[$key] );
</ins><span class="cx">                   }
</span><span class="cx">          }
</span><span class="cx">  }
</span><span class="lines">@@ -1323,10 +1543,19 @@
</span><span class="cx">  $cache[ $key ] = $calendar_output;
</span><span class="cx">  wp_cache_set( 'get_calendar', $cache, 'calendar' );
</span><span class="cx"> 
</span><del>-       if ( $echo )
-               echo apply_filters( 'get_calendar',  $calendar_output );
-       else
-               return apply_filters( 'get_calendar',  $calendar_output );
</del><ins>+        if ( $echo ) {
+               /**
+                * Filter the HTML calendar output.
+                *
+                * @since 3.0.0
+                *
+                * @param string $calendar_output HTML output of the calendar.
+                */
+               echo apply_filters( 'get_calendar', $calendar_output );
+       } else {
+               /** This filter is documented in wp-includes/general-template.php */
+               return apply_filters( 'get_calendar', $calendar_output );
+       }
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1394,6 +1623,7 @@
</span><span class="cx">  * Date string output can be filtered with 'get_the_date'.
</span><span class="cx">  *
</span><span class="cx">  * @since 0.71
</span><ins>+ *
</ins><span class="cx">  * @uses get_the_date()
</span><span class="cx">  * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
</span><span class="cx">  * @param string $before Optional. Output before the date.
</span><span class="lines">@@ -1408,6 +1638,17 @@
</span><span class="cx">          $the_date = $before . get_the_date( $d ) . $after;
</span><span class="cx">          $previousday = $currentday;
</span><span class="cx"> 
</span><ins>+               /**
+                * Filter the date a post was published for display.
+                *
+                * @since 0.71
+                *
+                * @param string $the_date The formatted date string.
+                * @param string $d        PHP date format. Defaults to 'date_format' option
+                *                         if not specified.
+                * @param string $before   HTML output before the date.
+                * @param string $after    HTML output after the date.
+                */
</ins><span class="cx">           $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
</span><span class="cx"> 
</span><span class="cx">          if ( $echo )
</span><span class="lines">@@ -1441,13 +1682,14 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  /**
</span><del>-        * Filter the date returned from the get_the_date function.
</del><ins>+         * Filter the date a post was published.
</ins><span class="cx">    *
</span><span class="cx">   * @since 3.0.0
</span><span class="cx">   *
</span><span class="cx">   * @param string      $the_date The formatted date.
</span><del>-        * @param string      $d        The date format.
-        * @param int|WP_Post $post     The post object or id.
</del><ins>+         * @param string      $d        PHP date format. Defaults to 'date_format' option
+        *                              if not specified.
+        * @param int|WP_Post $post     The post object or ID.
</ins><span class="cx">    */
</span><span class="cx">  return apply_filters( 'get_the_date', $the_date, $d, $post );
</span><span class="cx"> }
</span><span class="lines">@@ -1466,8 +1708,20 @@
</span><span class="cx"> function the_modified_date($d = '', $before='', $after='', $echo = true) {
</span><span class="cx"> 
</span><span class="cx">  $the_modified_date = $before . get_the_modified_date($d) . $after;
</span><del>-       $the_modified_date = apply_filters('the_modified_date', $the_modified_date, $d, $before, $after);
</del><span class="cx"> 
</span><ins>+       /**
+        * Filter the date a post was last modified for display.
+        *
+        * @since 2.1.0
+        *
+        * @param string $the_modified_date The last modified date.
+        * @param string $d                 PHP date format. Defaults to 'date_format' option
+        *                                  if not specified.
+        * @param string $before            HTML output before the date.
+        * @param string $after             HTML output after the date.
+        */
+       $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $d, $before, $after );
+
</ins><span class="cx">   if ( $echo )
</span><span class="cx">          echo $the_modified_date;
</span><span class="cx">  else
</span><span class="lines">@@ -1488,7 +1742,17 @@
</span><span class="cx">          $the_time = get_post_modified_time(get_option('date_format'), null, null, true);
</span><span class="cx">  else
</span><span class="cx">          $the_time = get_post_modified_time($d, null, null, true);
</span><del>-       return apply_filters('get_the_modified_date', $the_time, $d);
</del><ins>+
+       /**
+        * Filter the date a post was last modified.
+        *
+        * @since 2.1.0
+        *
+        * @param string $the_time The formatted date.
+        * @param string $d        PHP date format. Defaults to value specified in
+        *                         'date_format' option.
+        */
+       return apply_filters( 'get_the_modified_date', $the_time, $d );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1499,7 +1763,16 @@
</span><span class="cx">  * @param string $d Either 'G', 'U', or php date format.
</span><span class="cx">  */
</span><span class="cx"> function the_time( $d = '' ) {
</span><del>-       echo apply_filters('the_time', get_the_time( $d ), $d);
</del><ins>+        /**
+        * Filter the time a post was written for display.
+        *
+        * @since 0.71
+        *
+        * @param string $get_the_time The formatted time.
+        * @param string $d            The time format. Accepts 'G', 'U',
+        *                             or php date format.
+        */
+       echo apply_filters( 'the_time', get_the_time( $d ), $d );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1520,7 +1793,19 @@
</span><span class="cx">          $the_time = get_post_time(get_option('time_format'), false, $post, true);
</span><span class="cx">  else
</span><span class="cx">          $the_time = get_post_time($d, false, $post, true);
</span><del>-       return apply_filters('get_the_time', $the_time, $d, $post);
</del><ins>+
+       /**
+        * Filter the time a post was written.
+        *
+        * @since 1.5.0
+        *
+        * @param string      $the_time The formatted time.
+        * @param string      $d        Format to use for retrieving the time the post was written.
+        *                              Accepts 'G', 'U', or php date format value specified
+        *                              in 'time_format' option. Default empty.
+        * @param int|WP_Post $post     WP_Post object or ID.
+        */
+       return apply_filters( 'get_the_time', $the_time, $d, $post );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1544,7 +1829,18 @@
</span><span class="cx">          $time = $post->post_date;
</span><span class="cx"> 
</span><span class="cx">  $time = mysql2date($d, $time, $translate);
</span><del>-       return apply_filters('get_post_time', $time, $d, $gmt);
</del><ins>+
+       /**
+        * Filter the localized time a post was written.
+        *
+        * @since 2.6.0
+        *
+        * @param string $time The formatted time.
+        * @param string $d    Format to use for retrieving the time the post was written.
+        *                     Accepts 'G', 'U', or php date format. Default 'U'.
+        * @param bool   $gmt  Whether to retrieve the GMT time. Default false.
+        */
+       return apply_filters( 'get_post_time', $time, $d, $gmt );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1555,7 +1851,17 @@
</span><span class="cx">  * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
</span><span class="cx">  */
</span><span class="cx"> function the_modified_time($d = '') {
</span><del>-       echo apply_filters('the_modified_time', get_the_modified_time($d), $d);
</del><ins>+        /**
+        * Filter the localized time a post was last modified, for display.
+        *
+        * @since 2.0.0
+        *
+        * @param string $get_the_modified_time The formatted time.
+        * @param string $d                     The time format. Accepts 'G', 'U',
+        *                                      or php date format. Defaults to value
+        *                                      specified in 'time_format' option.
+        */
+       echo apply_filters( 'the_modified_time', get_the_modified_time($d), $d );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1571,7 +1877,18 @@
</span><span class="cx">          $the_time = get_post_modified_time(get_option('time_format'), null, null, true);
</span><span class="cx">  else
</span><span class="cx">          $the_time = get_post_modified_time($d, null, null, true);
</span><del>-       return apply_filters('get_the_modified_time', $the_time, $d);
</del><ins>+
+       /**
+        * Filter the localized time a post was last modified.
+        *
+        * @since 2.0.0
+        *
+        * @param string $the_time The formatted time.
+        * @param string $d        Format to use for retrieving the time the post was
+        *                         written. Accepts 'G', 'U', or php date format. Defaults
+        *                         to value specified in 'time_format' option.
+        */
+       return apply_filters( 'get_the_modified_time', $the_time, $d );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1594,7 +1911,16 @@
</span><span class="cx">          $time = $post->post_modified;
</span><span class="cx">  $time = mysql2date($d, $time, $translate);
</span><span class="cx"> 
</span><del>-       return apply_filters('get_post_modified_time', $time, $d, $gmt);
</del><ins>+        /**
+        * Filter the localized time a post was last modified.
+        *
+        * @since 2.8.0
+        *
+        * @param string $time The formatted time.
+        * @param string $d    The date format. Accepts 'G', 'U', or php date format. Default 'U'.
+        * @param bool   $gmt  Whether to return the GMT time. Default false.
+        */
+       return apply_filters( 'get_post_modified_time', $time, $d, $gmt );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1607,7 +1933,15 @@
</span><span class="cx"> function the_weekday() {
</span><span class="cx">  global $wp_locale;
</span><span class="cx">  $the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
</span><del>-       $the_weekday = apply_filters('the_weekday', $the_weekday);
</del><ins>+
+       /**
+        * Filter the weekday on which the post was written, for display.
+        *
+        * @since 0.71
+        *
+        * @param string $the_weekday 
+        */
+       $the_weekday = apply_filters( 'the_weekday', $the_weekday );
</ins><span class="cx">   echo $the_weekday;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1631,7 +1965,17 @@
</span><span class="cx">          $the_weekday_date .= $after;
</span><span class="cx">          $previousweekday = $currentday;
</span><span class="cx">  }
</span><del>-       $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after);
</del><ins>+
+       /**
+        * Filter the localized date on which the post was written, for display.
+        *
+        * @since 0.71
+        *
+        * @param string $the_weekday_date 
+        * @param string $before           The HTML to output before the date.
+        * @param string $after            The HTML to output after the date.
+        */
+       $the_weekday_date = apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
</ins><span class="cx">   echo $the_weekday_date;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1639,20 +1983,28 @@
</span><span class="cx">  * Fire the wp_head action
</span><span class="cx">  *
</span><span class="cx">  * @since 1.2.0
</span><del>- * @uses do_action() Calls 'wp_head' hook.
</del><span class="cx">  */
</span><span class="cx"> function wp_head() {
</span><del>-       do_action('wp_head');
</del><ins>+        /**
+        * Print scripts or data in the head tag on the front end.
+        *
+        * @since 1.5.0
+        */
+       do_action( 'wp_head' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Fire the wp_footer action
</span><span class="cx">  *
</span><span class="cx">  * @since 1.5.1
</span><del>- * @uses do_action() Calls 'wp_footer' hook.
</del><span class="cx">  */
</span><span class="cx"> function wp_footer() {
</span><del>-       do_action('wp_footer');
</del><ins>+        /**
+        * Print scripts or data before the closing body tag on the front end.
+        *
+        * @since 1.5.1
+        */
+       do_action( 'wp_footer' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1832,7 +2184,14 @@
</span><span class="cx">          }
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       return apply_filters('user_can_richedit', $wp_rich_edit);
</del><ins>+        /**
+        * Filter whether the user can access the rich (Visual) editor.
+        *
+        * @since 2.1.0
+        *
+        * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
+        */
+       return apply_filters( 'user_can_richedit', $wp_rich_edit );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1851,7 +2210,15 @@
</span><span class="cx">          $ed = get_user_setting('editor', 'tinymce');
</span><span class="cx">          $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
</span><span class="cx">  }
</span><del>-       return apply_filters( 'wp_default_editor', $r ); // filter
</del><ins>+
+       /**
+        * Filter which editor should be displayed by default.
+        *
+        * @since 2.5.0
+        *
+        * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
+        */
+       return apply_filters( 'wp_default_editor', $r );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1894,7 +2261,15 @@
</span><span class="cx">  * @return string
</span><span class="cx">  */
</span><span class="cx"> function get_search_query( $escaped = true ) {
</span><ins>+       /**
+        * Filter the contents of the search query variable.
+        *
+        * @since 2.3.0
+        *
+        * @param mixed $search Contents of the search query variable.
+        */
</ins><span class="cx">   $query = apply_filters( 'get_search_query', get_query_var( 's' ) );
</span><ins>+
</ins><span class="cx">   if ( $escaped )
</span><span class="cx">          $query = esc_attr( $query );
</span><span class="cx">  return $query;
</span><span class="lines">@@ -1910,6 +2285,13 @@
</span><span class="cx">  * @since 2.1.0
</span><span class="cx">  */
</span><span class="cx"> function the_search_query() {
</span><ins>+       /**
+        * Filter the contents of the search query variable for display.
+        *
+        * @since 2.3.0
+        *
+        * @param mixed $search Contents of the search query variable.
+        */
</ins><span class="cx">   echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1939,8 +2321,15 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  $output = implode(' ', $attributes);
</span><del>-       $output = apply_filters('language_attributes', $output);
-       echo $output;
</del><ins>+
+       /**
+        * Filter the language attributes for display in the html tag.
+        *
+        * @since 2.5.0
+        *
+        * @param string $output A space-separated list of language attributes.
+        */
+       echo apply_filters( 'language_attributes', $output );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2035,6 +2424,14 @@
</span><span class="cx">          if ( $add_args )
</span><span class="cx">                  $link = add_query_arg( $add_args, $link );
</span><span class="cx">          $link .= $add_fragment;
</span><ins>+
+               /**
+                * Filter the paginated links for the given archive pages.
+                *
+                * @since 3.0.0
+                *
+                * @param string $link The paginated link URL.
+                */
</ins><span class="cx">           $page_links[] = '<a class="prev page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $prev_text . '</a>';
</span><span class="cx">  endif;
</span><span class="cx">  for ( $n = 1; $n <= $total; $n++ ) :
</span><span class="lines">@@ -2048,6 +2445,8 @@
</span><span class="cx">                          if ( $add_args )
</span><span class="cx">                                  $link = add_query_arg( $add_args, $link );
</span><span class="cx">                          $link .= $add_fragment;
</span><ins>+
+                               /** This filter is documented in wp-includes/general-template.php */
</ins><span class="cx">                           $page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>" . $before_page_number . number_format_i18n( $n ) . $after_page_number . "</a>";
</span><span class="cx">                          $dots = true;
</span><span class="cx">                  elseif ( $dots && !$show_all ) :
</span><span class="lines">@@ -2062,6 +2461,8 @@
</span><span class="cx">          if ( $add_args )
</span><span class="cx">                  $link = add_query_arg( $add_args, $link );
</span><span class="cx">          $link .= $add_fragment;
</span><ins>+
+               /** This filter is documented in wp-includes/general-template.php */
</ins><span class="cx">           $page_links[] = '<a class="next page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $next_text . '</a>';
</span><span class="cx">  endif;
</span><span class="cx">  switch ( $type ) :
</span><span class="lines">@@ -2191,6 +2592,14 @@
</span><span class="cx">  }
</span><span class="cx">  $_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
</span><span class="cx"> 
</span><ins>+       /**
+        * Filter the URI of a WordPress admin CSS file.
+        *
+        * @since 2.3.0
+        *
+        * @param string $_file Relative path to the file with query arguments attached.
+        * @param string $file  Relative path to the file, minus its ".css" extension.
+        */
</ins><span class="cx">   return apply_filters( 'wp_admin_css_uri', $_file, $file );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2231,9 +2640,23 @@
</span><span class="cx">          return;
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       /**
+        * Filter the stylesheet link to the specified CSS file.
+        *
+        * If the site is set to display right-to-left, the RTL stylesheet link
+        * will be used instead.
+        *
+        * @since 2.3.0
+        *
+        * @param string $file Style handle name or filename (without ".css" extension)
+        *                     relative to wp-admin/. Defaults to 'wp-admin'.
+        */
</ins><span class="cx">   echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
</span><del>-       if ( function_exists( 'is_rtl' ) && is_rtl() )
</del><ins>+
+       if ( function_exists( 'is_rtl' ) && is_rtl() ) {
+               /** This filter is documented in wp-includes/general-template.php */
</ins><span class="cx">           echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
</span><ins>+       }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2259,6 +2682,13 @@
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  */
</span><span class="cx"> function wp_generator() {
</span><ins>+       /**
+        * Filter the output of the XHTML generator tag.
+        *
+        * @since 2.5.0
+        *
+        * @param string $generator_type The XHTML generator.
+        */
</ins><span class="cx">   the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2269,12 +2699,20 @@
</span><span class="cx">  * for a plugin to filter generators overall the the_generator filter.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><del>- * @uses apply_filters() Calls 'the_generator' hook.
</del><span class="cx">  *
</span><span class="cx">  * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export).
</span><span class="cx">  */
</span><span class="cx"> function the_generator( $type ) {
</span><del>-       echo apply_filters('the_generator', get_the_generator($type), $type) . "\n";
</del><ins>+        /**
+        * Filter the output of the XHTML generator tag for display.
+        *
+        * @since 2.5.0
+        *
+        * @param string $generator_type The generator output.
+        * @param string $type           The type of generator to output. Accepts 'html',
+        *                               'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
+        */
+       echo apply_filters( 'the_generator', get_the_generator($type), $type ) . "\n";
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -2285,7 +2723,6 @@
</span><span class="cx">  * 'get_the_generator_{$type}' filter.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><del>- * @uses apply_filters() Calls 'get_the_generator_$type' hook.
</del><span class="cx">  *
</span><span class="cx">  * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export).
</span><span class="cx">  * @return string The HTML content for the generator.
</span><span class="lines">@@ -2340,6 +2777,18 @@
</span><span class="cx">                  $gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="'. date('Y-m-d H:i') . '" -->';
</span><span class="cx">                  break;
</span><span class="cx">  }
</span><ins>+
+       /**
+        * Filter the HTML for the retrieved generator type.
+        *
+        * The dynamic portion of the hook name, $type, refers to the generator type.
+        *
+        * @since 2.5.0
+        *
+        * @param string $gen  The HTML markup output to 'wp_head()'.
+        * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom',
+        *                     'rss2', 'rdf', 'comment', 'export'.
+        */
</ins><span class="cx">   return apply_filters( "get_the_generator_{$type}", $gen, $type );
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>