Make WordPress Core


Ignore:
Timestamp:
11/24/2014 05:18:56 AM (10 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:

  • Remove HTML tag from parameter description in comment_form()
  • Remove HTML tag from a summary for the comment_form_top hook
  • Markdown-indent a code snippet in the description for get_linkobjectsbyname()
  • Markdown-indent a code snippet and format an unordered list in the description for get_linkobjects()
  • Backtick-escape some inline code in the description for clean_pre()
  • Remove HTML tag from the summary for the rss_tag_pre hook
  • Various formatting fixes in the descriptions for get_filesystem_method() and request_filesystem_credentials()

Props rarst for the initial patch.
See #30473.

File:
1 edited

Legend:

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

    r30202 r30538  
    452452 * Gets an array of link objects associated with category $cat_name.
    453453 *
    454  * <code>
    455  *  $links = get_linkobjectsbyname('fred');
    456  *  foreach ($links as $link) {
    457  *      echo '<li>'.$link->link_name.'</li>';
    458  *  }
    459  * </code>
     454 *     $links = get_linkobjectsbyname( 'fred' );
     455 *     foreach ( $links as $link ) {
     456 *          echo '<li>' . $link->link_name . '</li>';
     457 *     }
    460458 *
    461459 * @since 1.0.1
     
    486484 *
    487485 * Usage:
    488  * <code>
    489  *  $links = get_linkobjects(1);
    490  *  if ($links) {
    491  *      foreach ($links as $link) {
    492  *          echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
    493  *      }
    494  *  }
    495  * </code>
     486 *
     487 *     $links = get_linkobjects(1);
     488 *     if ($links) {
     489 *      foreach ($links as $link) {
     490 *          echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
     491 *      }
     492 *     }
    496493 *
    497494 * Fields are:
    498  * <ol>
    499  *  <li>link_id</li>
    500  *  <li>link_url</li>
    501  *  <li>link_name</li>
    502  *  <li>link_image</li>
    503  *  <li>link_target</li>
    504  *  <li>link_category</li>
    505  *  <li>link_description</li>
    506  *  <li>link_visible</li>
    507  *  <li>link_owner</li>
    508  *  <li>link_rating</li>
    509  *  <li>link_updated</li>
    510  *  <li>link_rel</li>
    511  *  <li>link_notes</li>
    512  * </ol>
     495 *
     496 * - link_id
     497 * - link_url
     498 * - link_name
     499 * - link_image
     500 * - link_target
     501 * - link_category
     502 * - link_description
     503 * - link_visible
     504 * - link_owner
     505 * - link_rating
     506 * - link_updated
     507 * - link_rel
     508 * - link_notes
    513509 *
    514510 * @since 1.0.1
     
    29902986 * Accepts matches array from preg_replace_callback in wpautop() or a string.
    29912987 *
    2992  * Ensures that the contents of a <<pre>>...<</pre>> HTML block are not
     2988 * Ensures that the contents of a `<pre>...</pre>` HTML block are not
    29932989 * converted into paragraphs or line-breaks.
    29942990 *
Note: See TracChangeset for help on using the changeset viewer.