Make WordPress Core


Ignore:
Timestamp:
11/24/2014 06:14:03 AM (11 years ago)
Author:
DrewAPicture
Message:

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 #30473.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite.php

    r29788 r30545  
    227227 * places specified by the provided bitmask. For example:
    228228 *
    229  * <code>
    230  * add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
    231  * </code>
     229 *     add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
    232230 *
    233231 * will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
    234232 * that describes a permalink (post) or page. This is rewritten to "json=$match"
    235233 * where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
    236  * "<permalink>/json/foo/").
     234 * "[permalink]/json/foo/").
    237235 *
    238236 * A new query var with the same name as the endpoint will also be created.
     
    240238 * When specifying $places ensure that you are using the EP_* constants (or a
    241239 * combination of them using the bitwise OR operator) as their values are not
    242  * guaranteed to remain static (especially EP_ALL).
    243  *
    244  * Be sure to flush the rewrite rules - flush_rewrite_rules() - when your plugin gets
     240 * guaranteed to remain static (especially `EP_ALL`).
     241 *
     242 * Be sure to flush the rewrite rules - {@see flush_rewrite_rules()} - when your plugin gets
    245243 * activated and deactivated.
    246244 *
Note: See TracChangeset for help on using the changeset viewer.