Make WordPress Core


Ignore:
Timestamp:
11/24/2014 05:46:04 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:

  • Markdown-indent a code snippet in the file header for wp-admin/install-helper.php
  • Add markdown formatting and two inline @see tags to the description for translate()
  • Markdown-indent a code snippet in the description for _n_noop()
  • Remove HTML tags from the summary for get_media_embedded_in_content()
  • Remove an HTML tag from the summary for wpview_media_sandbox_styles()

Props rarst.
See #30473.

File:
1 edited

Legend:

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

    r30495 r30542  
    7777 * If there is no translation, or the text domain isn't loaded, the original text is returned.
    7878 *
    79  * <strong>Note:</strong> Don't use translate() directly, use __() or related functions.
     79 * *Note:* Don't use {@see translate()} directly, use `{@see __()} or related functions.
    8080 *
    8181 * @since 2.2.0
     
    8888    $translations = get_translations_for_domain( $domain );
    8989    $translations = $translations->translate( $text );
     90
    9091    /**
    9192     * Filter text with its translation.
     
    365366 *
    366367 * Example:
    367  * <code>
    368  * $messages = array(
    369  *      'post' => _n_noop('%s post', '%s posts'),
    370  *      'page' => _n_noop('%s pages', '%s pages')
    371  * );
    372  * ...
    373  * $message = $messages[$type];
    374  * $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
    375  * </code>
     368 *
     369 *     $messages = array(
     370 *          'post' => _n_noop( '%s post', '%s posts' ),
     371 *          'page' => _n_noop( '%s pages', '%s pages' ),
     372 *     );
     373 *     ...
     374 *     $message = $messages[ $type ];
     375 *     $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count );
    376376 *
    377377 * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.