<!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>[30545] trunk/src/wp-includes: Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.</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" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/30545">30545</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/30545","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>DrewAPicture</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-11-24 06:14:03 +0000 (Mon, 24 Nov 2014)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.

Affects DocBlocks for the following core elements:
* Backtick-escape HTML tags in several argument descriptions for `wp_link_pages()`
* Remove an HTML tag from the summary for `prepend_attachment()`
* Backtick-escape inline code in the description for `get_extended()`
* Backtick-escape inline code in the description for `get_post_type_labels()`
* Various markdown formatting in the description for `add_rewrite_endpoint()`
* Markdown-indent a code snippet in the file header for wp-includes/shortcodes.php
* Markdown-indent code snippets in the description for `add_shortcode()

Props rarst.
See <a href="https://core.trac.wordpress.org/ticket/30473">#30473</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesposttemplatephp">trunk/src/wp-includes/post-template.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrewritephp">trunk/src/wp-includes/rewrite.php</a></li>
<li><a href="#trunksrcwpincludesshortcodesphp">trunk/src/wp-includes/shortcodes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesposttemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/post-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post-template.php   2014-11-24 06:04:10 UTC (rev 30544)
+++ trunk/src/wp-includes/post-template.php     2014-11-24 06:14:03 UTC (rev 30545)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -730,11 +730,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @param string|array $args {
</span><span class="cx" style="display: block; padding: 0 10px">  *     Optional. Array or string of default arguments.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *     @type string       $before           HTML or text to prepend to each link. Default is '<p> Pages:'.
- *     @type string       $after            HTML or text to append to each link. Default is '</p>'.
- *     @type string       $link_before      HTML or text to prepend to each link, inside the <a> tag.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     @type string       $before           HTML or text to prepend to each link. Default is `<p> Pages:`.
+ *     @type string       $after            HTML or text to append to each link. Default is `</p>`.
+ *     @type string       $link_before      HTML or text to prepend to each link, inside the `<a>` tag.
</ins><span class="cx" style="display: block; padding: 0 10px">  *                                          Also prepended to the current item, which is not linked. Default empty.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *     @type string       $link_after       HTML or text to append to each Pages link inside the <a> tag.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     @type string       $link_after       HTML or text to append to each Pages link inside the `<a>` tag.
</ins><span class="cx" style="display: block; padding: 0 10px">  *                                          Also appended to the current item, which is not linked. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px">  *     @type string       $next_or_number   Indicates whether page numbers should be used. Valid values are number
</span><span class="cx" style="display: block; padding: 0 10px">  *                                          and next. Default is 'number'.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1510,7 +1510,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Wrap attachment in <<p>> element before content.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Wrap attachment in paragraph tag before content.
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @since 2.0.0
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span></span></pre></div>
<a id="trunksrcwpincludespostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post.php    2014-11-24 06:04:10 UTC (rev 30544)
+++ trunk/src/wp-includes/post.php      2014-11-24 06:14:03 UTC (rev 30545)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -372,8 +372,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * referenced.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * The returned array has 'main', 'extended', and 'more_text' keys. Main has the text before
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * the <code><!--more--></code>. The 'extended' key has the content after the
- * <code><!--more--></code> comment. The 'more_text' key has the custom "Read More" text.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * the `<!--more-->`. The 'extended' key has the content after the
+ * `<!--more-->` comment. The 'more_text' key has the custom "Read More" text.
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @since 1.0.0
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1594,8 +1594,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * - singular_name - name for one object of this post type. Default is Post/Page
</span><span class="cx" style="display: block; padding: 0 10px">  * - add_new - Default is Add New for both hierarchical and non-hierarchical types.
</span><span class="cx" style="display: block; padding: 0 10px">  *             When internationalizing this string, please use a gettext context
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *             {@see http://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context}
- *             matching your post type. Example: <code>_x('Add New', 'product');</code>.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *             {@link http://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context}
+ *             matching your post type. Example: `_x( 'Add New', 'product' );`.
</ins><span class="cx" style="display: block; padding: 0 10px">  * - add_new_item - Default is Add New Post/Add New Page.
</span><span class="cx" style="display: block; padding: 0 10px">  * - edit_item - Default is Edit Post/Edit Page.
</span><span class="cx" style="display: block; padding: 0 10px">  * - new_item - Default is New Post/New Page.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1606,7 +1606,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical
</span><span class="cx" style="display: block; padding: 0 10px">  *                       ones the default is 'Parent Page:'.
</span><span class="cx" style="display: block; padding: 0 10px">  * - all_items - String for the submenu. Default is All Posts/All Pages.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * - menu_name - Default is the same as <code>name</code>.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * - menu_name - Default is the same as `name`.
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * Above, the first default value is for non-hierarchical post types (like posts)
</span><span class="cx" style="display: block; padding: 0 10px">  * and the second one is for hierarchical post types (like pages).
</span></span></pre></div>
<a id="trunksrcwpincludesrewritephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rewrite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rewrite.php 2014-11-24 06:04:10 UTC (rev 30544)
+++ trunk/src/wp-includes/rewrite.php   2014-11-24 06:14:03 UTC (rev 30545)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -226,22 +226,20 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * Adding an endpoint creates extra rewrite rules for each of the matching
</span><span class="cx" style="display: block; padding: 0 10px">  * places specified by the provided bitmask. For example:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * <code>
- * add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
- * </code>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
</span><span class="cx" style="display: block; padding: 0 10px">  * that describes a permalink (post) or page. This is rewritten to "json=$match"
</span><span class="cx" style="display: block; padding: 0 10px">  * where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * "<permalink>/json/foo/").
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * "[permalink]/json/foo/").
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * A new query var with the same name as the endpoint will also be created.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * When specifying $places ensure that you are using the EP_* constants (or a
</span><span class="cx" style="display: block; padding: 0 10px">  * combination of them using the bitwise OR operator) as their values are not
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * guaranteed to remain static (especially EP_ALL).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * guaranteed to remain static (especially `EP_ALL`).
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Be sure to flush the rewrite rules - flush_rewrite_rules() - when your plugin gets
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Be sure to flush the rewrite rules - {@see flush_rewrite_rules()} - when your plugin gets
</ins><span class="cx" style="display: block; padding: 0 10px">  * activated and deactivated.
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @since 2.1.0
</span></span></pre></div>
<a id="trunksrcwpincludesshortcodesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/shortcodes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/shortcodes.php      2014-11-24 06:04:10 UTC (rev 30544)
+++ trunk/src/wp-includes/shortcodes.php        2014-11-24 06:14:03 UTC (rev 30545)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,9 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * To apply shortcode tags to content:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * <code>
- * $out = do_shortcode($content);
- * </code>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     $out = do_shortcode( $content );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @link http://codex.wordpress.org/Shortcode_API
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,38 +50,34 @@
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * Simplest example of a shortcode tag using the API:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * <code>
- * // [footag foo="bar"]
- * function footag_func($atts) {
- *     return "foo = {$atts[foo]}";
- * }
- * add_shortcode('footag', 'footag_func');
- * </code>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     // [footag foo="bar"]
+ *     function footag_func( $atts ) {
+ *         return "foo = {
+ *             $atts[foo]
+ *         }";
+ *     }
+ *     add_shortcode( 'footag', 'footag_func' );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * Example with nice attribute defaults:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * <code>
- * // [bartag foo="bar"]
- * function bartag_func($atts) {
- *     $args = shortcode_atts(array(
- *             'foo' => 'no foo',
- *             'baz' => 'default baz',
- *     ), $atts);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     // [bartag foo="bar"]
+ *     function bartag_func( $atts ) {
+ *         $args = shortcode_atts( array(
+ *             'foo' => 'no foo',
+ *             'baz' => 'default baz',
+ *         ), $atts );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *      return "foo = {$args['foo']}";
- * }
- * add_shortcode('bartag', 'bartag_func');
- * </code>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *         return "foo = {$args['foo']}";
+ *     }
+ *     add_shortcode( 'bartag', 'bartag_func' );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * Example with enclosed content:
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * <code>
- * // [baztag]content[/baztag]
- * function baztag_func($atts, $content='') {
- *     return "content = $content";
- * }
- * add_shortcode('baztag', 'baztag_func');
- * </code>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *     // [baztag]content[/baztag]
+ *     function baztag_func( $atts, $content = '' ) {
+ *         return "content = $content";
+ *     }
+ *     add_shortcode( 'baztag', 'baztag_func' );
</ins><span class="cx" style="display: block; padding: 0 10px">  *
</span><span class="cx" style="display: block; padding: 0 10px">  * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px">  *
</span></span></pre>
</div>
</div>

</body>
</html>