Make WordPress Core

Changeset 30542


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

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install-helper.php

    r30122 r30542  
    1111 * do, then it is advised to just write the SQL code yourself.
    1212 *
    13  * <code>
    14  * check_column('wp_links', 'link_description', 'mediumtext');
    15  * if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
    16  *     echo "ok\n";
     13 *     check_column( 'wp_links', 'link_description', 'mediumtext' );
     14 *     if ( check_column( $wpdb->comments, 'comment_author', 'tinytext' ) ) {
     15 *         echo "ok\n";
     16 *     }
    1717 *
    18  * $error_count = 0;
    19  * $tablename = $wpdb->links;
    20  * // check the column
    21  * if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) {
    22  *     $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
    23  *     $q = $wpdb->query($ddl);
    24  * }
     18 *     $error_count = 0;
     19 *     $tablename = $wpdb->links;
     20 *     // Check the column.
     21 *     if ( ! check_column($wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
     22 *         $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
     23 *         $q = $wpdb->query( $ddl );
     24 *     }
    2525 *
    26  * if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
    27  *     $res .= $tablename . ' - ok <br />';
    28  * } else {
    29  *     $res .= 'There was a problem with ' . $tablename . '<br />';
    30  *     ++$error_count;
    31  * }
    32  * </code>
     26 *     if ( check_column( $wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
     27 *         $res .= $tablename . ' - ok <br />';
     28 *     } else {
     29 *         $res .= 'There was a problem with ' . $tablename . '<br />';
     30 *         ++$error_count;
     31 *     }
    3332 *
    3433 * @package WordPress
  • 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
  • trunk/src/wp-includes/media.php

    r30501 r30542  
    31013101
    31023102/**
    3103  * Check the content blob for an <audio>, <video> <object>, <embed>, or <iframe>
     3103 * Check the content blob for an audio, video, object, embed, or iframe tags.
    31043104 *
    31053105 * @since 3.6.0
     
    32873287
    32883288/**
    3289  * Return the URls for CSS files used in an <iframe>-sandbox'd TinyMCE media view
     3289 * Return the URLs for CSS files used in an iframe-sandbox'd TinyMCE media view.
    32903290 *
    32913291 * @since 4.0.0
Note: See TracChangeset for help on using the changeset viewer.